From 947b8814056ea2fba6bbcfab86591f74bffc0311 Mon Sep 17 00:00:00 2001 From: tromey Date: Fri, 23 Sep 2005 21:31:04 +0000 Subject: Imported Classpath 0.18. * sources.am, Makefile.in: Updated. * Makefile.am (nat_source_files): Removed natProxy.cc. * java/lang/reflect/natProxy.cc: Removed. * gnu/classpath/jdwp/VMFrame.java, gnu/classpath/jdwp/VMIdManager.java, gnu/classpath/jdwp/VMVirtualMachine.java, java/lang/reflect/VMProxy.java: New files. 2005-09-23 Thomas Fitzsimmons * scripts/makemake.tcl (verbose): Add gnu/java/awt/peer/qt to BC list. 2005-09-23 Thomas Fitzsimmons * gnu/java/net/DefaultContentHandlerFactory.java (getContent): Remove ClasspathToolkit references. 2005-09-23 Thomas Fitzsimmons * gnu/awt/xlib/XCanvasPeer.java: Add new peer methods. * gnu/awt/xlib/XFramePeer.java: Likewise. * gnu/awt/xlib/XGraphicsConfiguration.java: Likewise. 2005-09-23 Thomas Fitzsimmons * Makefile.am (libgcjawt_la_SOURCES): Remove jawt.c. Add classpath/native/jawt/jawt.c. * Makefile.in: Regenerate. * jawt.c: Remove file. * include/Makefile.am (tool_include__HEADERS): Remove jawt.h and jawt_md.h. Add ../classpath/include/jawt.h and ../classpath/include/jawt_md.h. * include/Makefile.in: Regenerate. * include/jawt.h: Regenerate. * include/jawt_md.h: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104586 138bc75d-0d04-0410-961f-82ee72b054a4 --- .../classpath/gnu/CORBA/ServiceRequestAdapter.java | 37 ++++++++++++++-------- 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java') diff --git a/libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java b/libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java index 0b698818215..7f40fc84d2d 100644 --- a/libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java +++ b/libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java @@ -53,10 +53,11 @@ import org.omg.CORBA.portable.ResponseHandler; import org.omg.CORBA.portable.Streamable; /** - * This class exists to handle obsolete invocation style using - * ServerRequest. - * - * @deprecated The method {@link ObjectImpl#_invoke} is much faster. + * This class supports invocation using ServerRequest. When possible, + * it is better to use the {@link ObjectImpl#_invoke} rather than + * working via ServerRequest. However since 1.4 the ServerRequest is + * involved into POA machinery making this type of call is sometimes + * inavoidable. * * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) */ @@ -86,13 +87,13 @@ public class ServiceRequestAdapter } /** - * The old style invocation using the currently deprecated server - * request class. + * Make an invocation. * * @param request a server request, containg the invocation information. * @param target the invocation target - * @param result the result holder with the set suitable streamable to read - * the result or null for void. + * @param result the result holder with the set suitable streamable. + * Using this parameter only increase the performance. It can be + * null if the return type is void or unknown. */ public static void invoke(ServerRequest request, InvokeHandler target, Streamable result @@ -133,12 +134,20 @@ public class ServiceRequestAdapter else { if (result != null) - { - result._read(in); - gnuAny r = new gnuAny(); - r.insert_Streamable(result); - request.set_result(r); - }; + { + // Use the holder for the return value, if provided. + result._read(in); + + gnuAny r = new gnuAny(); + r.insert_Streamable(result); + request.set_result(r); + } + else + { + // Use the universal holder otherwise. + gnuAny r = new gnuAny(); + r.insert_Streamable(new streamReadyHolder(in)); + } // Unpack the arguments for (int i = 0; i < args.count(); i++) -- cgit v1.2.3