diff options
Diffstat (limited to 'libjava/classpath/org/omg/CORBA_2_3')
3 files changed, 44 insertions, 48 deletions
diff --git a/libjava/classpath/org/omg/CORBA_2_3/ORB.java b/libjava/classpath/org/omg/CORBA_2_3/ORB.java index 7a9dc6a1a57..82660fea705 100644 --- a/libjava/classpath/org/omg/CORBA_2_3/ORB.java +++ b/libjava/classpath/org/omg/CORBA_2_3/ORB.java @@ -117,11 +117,9 @@ public abstract class ORB } /** - * Up till OMG 3.0.3 inclusive and also in Suns API till 1.4 - * inclusive this is totally undocumented. No problem, though, - * because is in addition not implemented. - * - * @throws NO_IMPLEMENT, always. + * This method is called by RMI-IIOP {@link javax.rmi.Tie#orb(ORB)}, + * passing <code>this</code> as parameter. The ORB will try to connect + * that tie as one of its objects. */ public void set_delegate(java.lang.Object wrapper) { diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java b/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java index 06ee33e6616..23055ef2d4d 100644 --- a/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java +++ b/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java @@ -40,9 +40,9 @@ package org.omg.CORBA_2_3.portable; import gnu.CORBA.CDR.Vio; -import org.omg.CORBA.MARSHAL; +import org.omg.CORBA.CustomMarshal; import org.omg.CORBA.portable.BoxedValueHelper; -import org.omg.CORBA.portable.ValueFactory; +import org.omg.CORBA.portable.StreamableValue; import java.io.Serializable; @@ -78,12 +78,12 @@ public abstract class InputStream */ public Object read_abstract_interface() { - boolean isValue = read_boolean(); + boolean isObject = read_boolean(); - if (isValue) - return read_value(); - else + if (isObject) return read_Object(); + else + return read_value(); } /** @@ -192,11 +192,7 @@ public abstract class InputStream */ public Serializable read_value(String repository_id) { - ValueFactory factory = - ((org.omg.CORBA_2_3.ORB) orb()).lookup_value_factory(repository_id); - if (factory == null) - throw new MARSHAL("No factory"); - return (Serializable) Vio.read(this, null, factory); + return Vio.read(this, repository_id); } /** diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java b/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java index 2ff8c226a82..70f9a4913ba 100644 --- a/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java +++ b/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java @@ -64,40 +64,40 @@ public abstract class OutputStream extends org.omg.CORBA.portable.OutputStream { /** - * Writes an abstract interface to the stream. An abstract interface can - * be eithe CORBA object or value type and is written as a union with - * the boolean discriminator (false for objects, true for value types). - * - * The object from value is separated by fact that all values implement - * the {@link ValueBase} interface. Also, the passed parameter is treated - * as value it it does not implement CORBA Object. - * + * Writes an abstract interface to the stream. An abstract interface can be + * eithe CORBA object or value type and is written as a union with the boolean + * discriminator (false for objects, true for value types). + * + * The object from value is separated by fact that all values implement the + * {@link ValueBase} interface. Also, the passed parameter is treated as value + * it it does not implement CORBA Object. + * * @param an_interface an abstract interface to write. */ public void write_abstract_interface(java.lang.Object an_interface) { - boolean isValue = - an_interface instanceof ValueBase || - (!(an_interface instanceof org.omg.CORBA.Object)); + boolean isObject = !(an_interface instanceof ValueBase) + && an_interface instanceof org.omg.CORBA.Object; - write_boolean(isValue); + write_boolean(isObject); - if (isValue) - write_value((ValueBase) an_interface); - else + if (isObject) write_Object((org.omg.CORBA.Object) an_interface); + else + write_value((Serializable) an_interface); + } /** * Writes a value type into the output stream. - * - * The value type must implement either {@link CustomValue} - * (for user-defined writing method) or {@link StramableValue} - * (for standard writing using code, generated by IDL compiler). - * - * The written record will have a repository id, matching the - * class of the passed object. The codebase will not be written. - * + * + * The value type must implement either {@link CustomValue} (for user-defined + * writing method) or {@link StramableValue} (for standard writing using code, + * generated by IDL compiler). + * + * The written record will have a repository id, matching the class of the + * passed object. The codebase will not be written. + * * @param value a value type object to write. */ public void write_value(Serializable value) @@ -124,7 +124,9 @@ public abstract class OutputStream * Writes a value type into the output stream, stating it is an * instance of the given class. The written record * will have a repository id, matching the passed class. - * The codebase will not be written. + * The codebase will not be written. It the object + * being written is an instance of the different class, this results + * writing two Id inheritance hierarchy. * * The value type must implement either {@link CustomValue} * (for user-defined writing method) or {@link StramableValue} @@ -138,15 +140,15 @@ public abstract class OutputStream } /** - * Writes a value type into the output stream, - * stating it has the given repository id. - * - * The value type must implement either {@link CustomValue} - * (for user-defined writing method) or {@link StramableValue} - * (for standard writing using code, generated by IDL compiler). - * + * Writes a value type into the output stream, stating it has the given + * repository id. + * + * The value type must implement either {@link CustomValue} (for user-defined + * writing method) or {@link StramableValue} (for standard writing using code, + * generated by IDL compiler). + * * @param repository_id a repository id of the value type. - * + * * @param value a value type object to write. */ public void write_value(Serializable value, String repository_id) |