diff options
Diffstat (limited to 'libjava/classpath/org')
-rw-r--r-- | libjava/classpath/org/omg/IOP/TaggedComponentHelper.java | 28 | ||||
-rw-r--r-- | libjava/classpath/org/omg/PortableServer/Servant.java | 5 |
2 files changed, 9 insertions, 24 deletions
diff --git a/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java b/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java index 633891b..55090c7 100644 --- a/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java +++ b/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java @@ -136,18 +136,9 @@ public abstract class TaggedComponentHelper { TaggedComponent value = new TaggedComponent(); value.tag = input.read_long(); - value.component_data = new byte[input.read_long()]; - try - { - input.read(value.component_data); - } - catch (IOException e) - { - MARSHAL m = new MARSHAL(); - m.minor = Minor.Encapsulation; - m.initCause(e); - throw m; - } + int length = input.read_long(); + value.component_data = new byte[length]; + input.read_octet_array(value.component_data, 0, length); return value; } @@ -163,17 +154,6 @@ public abstract class TaggedComponentHelper { output.write_long(value.tag); output.write_long(value.component_data.length); - - try - { - output.write(value.component_data); - } - catch (IOException e) - { - MARSHAL m = new MARSHAL(); - m.minor = Minor.Encapsulation; - m.initCause(e); - throw m; - } + output.write_octet_array(value.component_data, 0, value.component_data.length); } }
\ No newline at end of file diff --git a/libjava/classpath/org/omg/PortableServer/Servant.java b/libjava/classpath/org/omg/PortableServer/Servant.java index 24eb715..fcb2cdd 100644 --- a/libjava/classpath/org/omg/PortableServer/Servant.java +++ b/libjava/classpath/org/omg/PortableServer/Servant.java @@ -39,6 +39,7 @@ exception statement from your version. */ package org.omg.PortableServer; import org.omg.CORBA.BAD_OPERATION; +import org.omg.CORBA.BAD_INV_ORDER; import org.omg.CORBA.NO_IMPLEMENT; import org.omg.CORBA.OBJECT_NOT_EXIST; import org.omg.CORBA.ORB; @@ -109,6 +110,10 @@ public abstract class Servant */ public final Delegate _get_delegate() { + if (delegate == null) { + throw new BAD_INV_ORDER + ("The Servant has not been associated with an ORBinstance"); + } return delegate; } |