diff options
| author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 23:20:01 +0000 |
|---|---|---|
| committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 23:20:01 +0000 |
| commit | 3b3101d8b5ae4f08a16c0b7111da6cad41bbd282 (patch) | |
| tree | a5eb7cf42a51869cc8aa1fad7ad6a90cca47fdd8 /libjava/classpath/org/omg/PortableInterceptor/CurrentHelper.java | |
| parent | 7e55c49d7d91ef9f09e93c1100119b1ab3652446 (diff) | |
| download | ppe42-gcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.tar.gz ppe42-gcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.zip | |
Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated.
* Makefile.in: Likewise.
* scripts/makemake.tcl: Use glob -nocomplain.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107049 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/org/omg/PortableInterceptor/CurrentHelper.java')
| -rw-r--r-- | libjava/classpath/org/omg/PortableInterceptor/CurrentHelper.java | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/libjava/classpath/org/omg/PortableInterceptor/CurrentHelper.java b/libjava/classpath/org/omg/PortableInterceptor/CurrentHelper.java index b7a5a541e93..df3bcaef72b 100644 --- a/libjava/classpath/org/omg/PortableInterceptor/CurrentHelper.java +++ b/libjava/classpath/org/omg/PortableInterceptor/CurrentHelper.java @@ -38,6 +38,8 @@ exception statement from your version. */ package org.omg.PortableInterceptor; +import gnu.CORBA.Minor; + import org.omg.CORBA.Any; import org.omg.CORBA.BAD_PARAM; import org.omg.CORBA.MARSHAL; @@ -45,6 +47,7 @@ import org.omg.CORBA.ORB; import org.omg.CORBA.TypeCode; import org.omg.CORBA.portable.InputStream; import org.omg.CORBA.portable.OutputStream; +import org.omg.PortableServer.ServantActivator; /** * The helper operations for the CORBA object {@link Current}. @@ -123,6 +126,25 @@ public abstract class CurrentHelper throw new BAD_PARAM("Not a Current"); } } + + /** + * Narrow the given object to the Current. For the objects that are + * always local, this operation does not differ from the ordinary + * {@link #narrow} (ClassCastException will be thrown if narrowing something + * different). + * + * @param obj the object to cast. + * + * @return the casted Current. + * + * @since 1.5 + * + * @see OMG issue 4158. + */ + public static Current unchecked_narrow(org.omg.CORBA.Object obj) + { + return narrow(obj); + } /** * Not supported for compatibility reasons. @@ -133,7 +155,9 @@ public abstract class CurrentHelper */ public static Current read(InputStream input) { - throw new MARSHAL(); + MARSHAL m = new MARSHAL("Inappropriate"); + m.minor = Minor.Inappropriate; + throw m; } /** @@ -145,6 +169,8 @@ public abstract class CurrentHelper */ public static void write(OutputStream output, Current value) { - throw new MARSHAL(); + MARSHAL m = new MARSHAL("Inappropriate"); + m.minor = Minor.Inappropriate; + throw m; } }
\ No newline at end of file |

