summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-25 11:19:21 +0000
committerAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-25 11:19:21 +0000
commit41e1e0307110d4258611fe186e1d8f12f1ea6cdf (patch)
tree3dc5ddfd8d506e4a7e5c4f39940da9c19a26bbd9
parent250c65fb36f7d4f671c6dcc6981bc0c0e38678a7 (diff)
downloadclasspath-41e1e0307110d4258611fe186e1d8f12f1ea6cdf.tar.gz
All helpers in jdk 1.5 contain the additional unuchecked_narrow method, discussed in http://www.omg.org/issues/issue4158.txt.
This path adds the method to our helper classes. 2005-10-25 Audrius Meskauskas <AudriusA@Bioinformatics.org> * org/omg/CosNaming/BindingIteratorHelper.java, org/omg/CosNaming/NamingContextExtHelper.java, org/omg/CosNaming/NamingContextHelper.java, org/omg/DynamicAny/DynAnyFactoryHelper.java, org/omg/DynamicAny/DynAnyHelper.java, org/omg/DynamicAny/DynArrayHelper.java, org/omg/DynamicAny/DynEnumHelper.java, org/omg/DynamicAny/DynFixedHelper.java, org/omg/DynamicAny/DynSequenceHelper.java, org/omg/DynamicAny/DynStructHelper.java, org/omg/DynamicAny/DynUnionHelper.java, org/omg/DynamicAny/DynValueHelper.java, org/omg/IOP/CodecFactoryHelper.java, org/omg/PortableInterceptor/CurrentHelper.java, org/omg/PortableServer/ServantActivatorHelper.java, org/omg/PortableServer/ServantLocatorHelper.java: Added unchecked_narrow method.
-rw-r--r--ChangeLog83
-rw-r--r--org/omg/CosNaming/BindingIteratorHelper.java29
-rw-r--r--org/omg/CosNaming/NamingContextExtHelper.java29
-rw-r--r--org/omg/CosNaming/NamingContextHelper.java29
-rw-r--r--org/omg/DynamicAny/DynAnyFactoryHelper.java19
-rw-r--r--org/omg/DynamicAny/DynAnyHelper.java19
-rw-r--r--org/omg/DynamicAny/DynArrayHelper.java19
-rw-r--r--org/omg/DynamicAny/DynEnumHelper.java19
-rw-r--r--org/omg/DynamicAny/DynFixedHelper.java19
-rw-r--r--org/omg/DynamicAny/DynSequenceHelper.java19
-rw-r--r--org/omg/DynamicAny/DynStructHelper.java19
-rw-r--r--org/omg/DynamicAny/DynUnionHelper.java19
-rw-r--r--org/omg/DynamicAny/DynValueHelper.java19
-rw-r--r--org/omg/IOP/CodecFactoryHelper.java19
-rw-r--r--org/omg/PortableInterceptor/CurrentHelper.java20
-rw-r--r--org/omg/PortableServer/ServantActivatorHelper.java21
-rw-r--r--org/omg/PortableServer/ServantLocatorHelper.java19
17 files changed, 389 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index 1009b95fe..9de179663 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+ 2005-10-25 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CosNaming/BindingIteratorHelper.java,
+ org/omg/CosNaming/NamingContextExtHelper.java,
+ org/omg/CosNaming/NamingContextHelper.java,
+ org/omg/DynamicAny/DynAnyFactoryHelper.java,
+ org/omg/DynamicAny/DynAnyHelper.java,
+ org/omg/DynamicAny/DynArrayHelper.java,
+ org/omg/DynamicAny/DynEnumHelper.java,
+ org/omg/DynamicAny/DynFixedHelper.java,
+ org/omg/DynamicAny/DynSequenceHelper.java,
+ org/omg/DynamicAny/DynStructHelper.java,
+ org/omg/DynamicAny/DynUnionHelper.java,
+ org/omg/DynamicAny/DynValueHelper.java,
+ org/omg/IOP/CodecFactoryHelper.java,
+ org/omg/PortableInterceptor/CurrentHelper.java,
+ org/omg/PortableServer/ServantActivatorHelper.java,
+ org/omg/PortableServer/ServantLocatorHelper.java: Added
+ unchecked_narrow method.
+
+
2005-10-24 Roman Kennke <kennke@aicas.com>
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
@@ -175,8 +196,8 @@
2005-10-23 Audrius Meskauskas <AudriusA@Bioinformatics.org>
- PR classpath/22972
- * java/io/File (createTempFile): Rewritten.
+ PR classpath/22972
+ * java/io/File (createTempFile): Rewritten.
2005-10-23 Audrius Meskauskas <AudriusA@Bioinformatics.org>
@@ -1122,16 +1143,16 @@
2005-10-17 Audrius Meskauskas <AudriusA@Bioinformatics.org>
- * gnu/CORBA/Focused_ORB.java: New file.
- * gnu/CORBA/Functional_ORB.java,
- org/omg/CORBA/ORB.java: Adapted to support the
- gnu.CORBA.ListenerPort property.
+ * gnu/CORBA/Focused_ORB.java: New file.
+ * gnu/CORBA/Functional_ORB.java,
+ org/omg/CORBA/ORB.java: Adapted to support the
+ gnu.CORBA.ListenerPort property.
2005-10-15 Audrius Meskauskas <AudriusA@Bioinformatics.org>
- * org/omg/CORBA/DynamicImplementation.java: Made concrete.
- (invoke): Implemented.
- gnu/CORBA/Simple_delegate.java (request): Implemented.
+ * org/omg/CORBA/DynamicImplementation.java: Made concrete.
+ (invoke): Implemented.
+ gnu/CORBA/Simple_delegate.java (request): Implemented.
2005-10-14 Lillian Angel <langel@redhat.com>
@@ -1218,12 +1239,12 @@
2005-10-14 Audrius Meskauskas <AudriusA@Bioinformatics.org>
- * org/omg/CORBA/PolicyErrorHelper.java,
- org/omg/CORBA/PolicyErrorHolder.java,
- org/omg/CORBA/UnknownUserExceptionHelper.java,
- org/omg/CORBA/UnknownUserExceptionHolder.java,
- org/omg/CORBA/WrongTransactionHelper.java,
- org/omg/CORBA/WrongTransactionHolder.java: New files.
+ * org/omg/CORBA/PolicyErrorHelper.java,
+ org/omg/CORBA/PolicyErrorHolder.java,
+ org/omg/CORBA/UnknownUserExceptionHelper.java,
+ org/omg/CORBA/UnknownUserExceptionHolder.java,
+ org/omg/CORBA/WrongTransactionHelper.java,
+ org/omg/CORBA/WrongTransactionHolder.java: New files.
2005-10-14 Anthony Balkissoon <abalkiss@redhat.com>
@@ -1313,13 +1334,13 @@
2005-10-14 Audrius Meskauskas <AudriusA@Bioinformatics.org>
- * org/omg/CORBA/PolicyErrorCodeHelper.java: New class.
+ * org/omg/CORBA/PolicyErrorCodeHelper.java: New class.
2005-10-14 Audrius Meskauskas <AudriusA@Bioinformatics.org>
- * org/omg/CORBA/LocalObject.java (_get_interface, _invoke, _is_local,
- _orb, _releaseReply, _request, _servant_postinvoke, _servant_preinvoke,
- validate_connection): New methods.
+ * org/omg/CORBA/LocalObject.java (_get_interface, _invoke, _is_local,
+ _orb, _releaseReply, _request, _servant_postinvoke, _servant_preinvoke,
+ validate_connection): New methods.
2005-10-14 Michael Koch <konqueror@gmx.de>
@@ -1975,24 +1996,24 @@
2005-10-11 Audrius Meskauskas <AudriusA@Bioinformatics.org>
- * examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
- (main): Message removed from the loop.
+ * examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
+ (main): Message removed from the loop.
2005-10-10 Audrius Meskauskas <AudriusA@Bioinformatics.org>
- * examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
- (main): 3 sec pause replaced by while(..) loop.
+ * examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
+ (main): 3 sec pause replaced by while(..) loop.
2005-10-10 Audrius Meskauskas <AudriusA@Bioinformatics.org>
- * gnu/CORBA/Interceptor/Registrator.java,
- gnu/CORBA/ObjectCreator.java,
- gnu/CORBA/gnuValueHolder.java,
- gnu/CORBA/stubFinder.java,
- gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java,
- gnu/javax/rmi/CORBA/StubDelegateImpl.java,
- gnu/javax/rmi/CORBA/UtilDelegateImpl.java,
- org/omg/CORBA/ORB.java: Use context class loader.
+ * gnu/CORBA/Interceptor/Registrator.java,
+ gnu/CORBA/ObjectCreator.java,
+ gnu/CORBA/gnuValueHolder.java,
+ gnu/CORBA/stubFinder.java,
+ gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java,
+ gnu/javax/rmi/CORBA/StubDelegateImpl.java,
+ gnu/javax/rmi/CORBA/UtilDelegateImpl.java,
+ org/omg/CORBA/ORB.java: Use context class loader.
2005-10-10 Roman Kennke <kennke@aicas.com>
diff --git a/org/omg/CosNaming/BindingIteratorHelper.java b/org/omg/CosNaming/BindingIteratorHelper.java
index 1c3676977..64f7b4dfa 100644
--- a/org/omg/CosNaming/BindingIteratorHelper.java
+++ b/org/omg/CosNaming/BindingIteratorHelper.java
@@ -124,6 +124,35 @@ public abstract class BindingIteratorHelper
return new _BindingIteratorStub(delegate);
}
}
+
+ /**
+ * Narrow the given object to the BindingIterator. No type-checking is
+ * performed to verify that the object actually supports the requested type.
+ * The {@link BAD_OPERATION} will be thrown if unsupported operations are
+ * invoked on the new returned reference, but no failure is expected at the
+ * time of the unchecked_narrow.
+ *
+ * @param obj the object to cast.
+ *
+ * @return the casted binding iterator.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static BindingIterator unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof BindingIterator)
+ return (BindingIterator) obj;
+ else
+ {
+ // Do not call the _is_a(..).
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _BindingIteratorStub(delegate);
+ }
+ }
/**
* Read the exception from the given CDR stream.
diff --git a/org/omg/CosNaming/NamingContextExtHelper.java b/org/omg/CosNaming/NamingContextExtHelper.java
index 6f4d5bee0..86bf8c55d 100644
--- a/org/omg/CosNaming/NamingContextExtHelper.java
+++ b/org/omg/CosNaming/NamingContextExtHelper.java
@@ -125,6 +125,35 @@ public abstract class NamingContextExtHelper
return new _NamingContextExtStub(delegate);
}
}
+
+ /**
+ * Narrow the given object to the NamingContextExt. No type-checking is
+ * performed to verify that the object actually supports the requested type.
+ * The {@link BAD_OPERATION} will be thrown if unsupported operations are
+ * invoked on the new returned reference, but no failure is expected at the
+ * time of the unchecked_narrow.
+ *
+ * @param obj the object to cast.
+ *
+ * @return the casted NamingContextExt
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static NamingContextExt unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof NamingContextExt)
+ return (NamingContextExt) obj;
+ else
+ {
+ // Do not call the _is_a(..).
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _NamingContextExtStub(delegate);
+ }
+ }
/**
* Read the extended naming context from the given CDR input stream.
diff --git a/org/omg/CosNaming/NamingContextHelper.java b/org/omg/CosNaming/NamingContextHelper.java
index 2b383f13d..fb9b091a6 100644
--- a/org/omg/CosNaming/NamingContextHelper.java
+++ b/org/omg/CosNaming/NamingContextHelper.java
@@ -133,6 +133,35 @@ public abstract class NamingContextHelper
else
throw new BAD_PARAM();
}
+
+ /**
+ * Narrow the given object to the NamingContext. No type-checking is performed
+ * to verify that the object actually supports the requested type. The
+ * {@link BAD_OPERATION} will be thrown if unsupported operations are invoked
+ * on the new returned reference, but no failure is expected at the time of
+ * the unchecked_narrow.
+ *
+ * @param obj the object to cast.
+ *
+ * @return the casted NamingContext.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static NamingContext unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof NamingContext)
+ return (NamingContext) obj;
+ else
+ {
+ // Do not call the _is_a(..).
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _NamingContextStub(delegate);
+ }
+ }
/**
* Read the naming context from the given CDR input stream.
diff --git a/org/omg/DynamicAny/DynAnyFactoryHelper.java b/org/omg/DynamicAny/DynAnyFactoryHelper.java
index e4942f41b..b8e3aafef 100644
--- a/org/omg/DynamicAny/DynAnyFactoryHelper.java
+++ b/org/omg/DynamicAny/DynAnyFactoryHelper.java
@@ -82,6 +82,25 @@ public abstract class DynAnyFactoryHelper
+ " is not a DynAnyFactory");
}
}
+
+ /**
+ * Narrow the given object to the DynAnyFactory. 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 DynAnyFactory.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static DynAnyFactory unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* Get the final_type code of the {@link DynAnyFactory}.
diff --git a/org/omg/DynamicAny/DynAnyHelper.java b/org/omg/DynamicAny/DynAnyHelper.java
index ca48cd4c5..73e2d9856 100644
--- a/org/omg/DynamicAny/DynAnyHelper.java
+++ b/org/omg/DynamicAny/DynAnyHelper.java
@@ -79,6 +79,25 @@ public abstract class DynAnyHelper
throw new BAD_PARAM(obj.getClass().getName() + " is not a DynAny");
}
}
+
+ /**
+ * Narrow the given object to the DynAny. 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 DynAny.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static DynAny unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* Get the type code of the {@link DynAny}.
diff --git a/org/omg/DynamicAny/DynArrayHelper.java b/org/omg/DynamicAny/DynArrayHelper.java
index 0372b5851..f2892c856 100644
--- a/org/omg/DynamicAny/DynArrayHelper.java
+++ b/org/omg/DynamicAny/DynArrayHelper.java
@@ -78,6 +78,25 @@ public abstract class DynArrayHelper
throw new BAD_PARAM(obj.getClass().getName() + " is not a DynArray");
}
}
+
+ /**
+ * Narrow the given object to the DynArray. 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 DynArray.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static DynArray unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* Get the type code of the {@link DynArray}.
diff --git a/org/omg/DynamicAny/DynEnumHelper.java b/org/omg/DynamicAny/DynEnumHelper.java
index 944d43757..8db1a2006 100644
--- a/org/omg/DynamicAny/DynEnumHelper.java
+++ b/org/omg/DynamicAny/DynEnumHelper.java
@@ -79,6 +79,25 @@ public abstract class DynEnumHelper
throw new BAD_PARAM(obj.getClass().getName() + " is not a DynEnum");
}
}
+
+ /**
+ * Narrow the given object to the DynEnum. 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 DynEnum.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static DynEnum unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* Get the type code of the {@link DynEnum}.
diff --git a/org/omg/DynamicAny/DynFixedHelper.java b/org/omg/DynamicAny/DynFixedHelper.java
index 1d818d7b1..84bb59d9f 100644
--- a/org/omg/DynamicAny/DynFixedHelper.java
+++ b/org/omg/DynamicAny/DynFixedHelper.java
@@ -79,6 +79,25 @@ public abstract class DynFixedHelper
throw new BAD_PARAM(obj.getClass().getName() + " is not a DynFixed");
}
}
+
+ /**
+ * Narrow the given object to the DynFixed. 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 DynFixed.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static DynFixed unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* Get the type code of the {@link DynFixed}.
diff --git a/org/omg/DynamicAny/DynSequenceHelper.java b/org/omg/DynamicAny/DynSequenceHelper.java
index c38a51f09..ad3013371 100644
--- a/org/omg/DynamicAny/DynSequenceHelper.java
+++ b/org/omg/DynamicAny/DynSequenceHelper.java
@@ -78,6 +78,25 @@ public abstract class DynSequenceHelper
throw new BAD_PARAM(obj.getClass().getName() + " is not a DynSequence");
}
}
+
+ /**
+ * Narrow the given object to the DynSequence. 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 DynSequence.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static DynSequence unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* Get the type code of the {@link DynSequence}.
diff --git a/org/omg/DynamicAny/DynStructHelper.java b/org/omg/DynamicAny/DynStructHelper.java
index e4790b443..021c5d031 100644
--- a/org/omg/DynamicAny/DynStructHelper.java
+++ b/org/omg/DynamicAny/DynStructHelper.java
@@ -78,6 +78,25 @@ public abstract class DynStructHelper
throw new BAD_PARAM(obj.getClass().getName() + " is not a DynStruct");
}
}
+
+ /**
+ * Narrow the given object to the DynStruct. 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 DynStruct.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static DynStruct unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* Get the type code of the {@link DynStruct}.
diff --git a/org/omg/DynamicAny/DynUnionHelper.java b/org/omg/DynamicAny/DynUnionHelper.java
index 794098333..8f924c086 100644
--- a/org/omg/DynamicAny/DynUnionHelper.java
+++ b/org/omg/DynamicAny/DynUnionHelper.java
@@ -78,6 +78,25 @@ public abstract class DynUnionHelper
throw new BAD_PARAM(obj.getClass().getName() + " is not a DynUnion");
}
}
+
+ /**
+ * Narrow the given object to the DynUnion. 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 DynUnion.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static DynUnion unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* Get the type code of the {@link DynUnion}.
diff --git a/org/omg/DynamicAny/DynValueHelper.java b/org/omg/DynamicAny/DynValueHelper.java
index a6d7afaa9..026ca4990 100644
--- a/org/omg/DynamicAny/DynValueHelper.java
+++ b/org/omg/DynamicAny/DynValueHelper.java
@@ -78,6 +78,25 @@ public abstract class DynValueHelper
throw new BAD_PARAM(obj.getClass().getName() + " is not a DynValue");
}
}
+
+ /**
+ * Narrow the given object to the DynValue. 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 DynValue.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static DynValue unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* Get the type code of the {@link DynValue}.
diff --git a/org/omg/IOP/CodecFactoryHelper.java b/org/omg/IOP/CodecFactoryHelper.java
index d5c55a264..fea0b887b 100644
--- a/org/omg/IOP/CodecFactoryHelper.java
+++ b/org/omg/IOP/CodecFactoryHelper.java
@@ -120,6 +120,25 @@ public abstract class CodecFactoryHelper
throw bad;
}
}
+
+ /**
+ * Narrow the given object to the CodecFactory. 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 CodecFactory.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static CodecFactory unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* This should read the CodecFactory from the CDR intput stream,
diff --git a/org/omg/PortableInterceptor/CurrentHelper.java b/org/omg/PortableInterceptor/CurrentHelper.java
index b6bd087ca..df3bcaef7 100644
--- a/org/omg/PortableInterceptor/CurrentHelper.java
+++ b/org/omg/PortableInterceptor/CurrentHelper.java
@@ -47,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}.
@@ -125,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.
diff --git a/org/omg/PortableServer/ServantActivatorHelper.java b/org/omg/PortableServer/ServantActivatorHelper.java
index f2779b1b5..8aa58b2f6 100644
--- a/org/omg/PortableServer/ServantActivatorHelper.java
+++ b/org/omg/PortableServer/ServantActivatorHelper.java
@@ -41,6 +41,7 @@ package org.omg.PortableServer;
import gnu.CORBA.Minor;
import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.BAD_PARAM;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.ORB;
@@ -114,6 +115,26 @@ public abstract class ServantActivatorHelper
throw bad;
}
}
+
+ /**
+ * Narrow the given object to the ServantActivator. 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 ServantActivator.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static ServantActivator unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
+
/**
* This should read the servant activator, but it cannot be transferred
diff --git a/org/omg/PortableServer/ServantLocatorHelper.java b/org/omg/PortableServer/ServantLocatorHelper.java
index 2195e7899..082c4c586 100644
--- a/org/omg/PortableServer/ServantLocatorHelper.java
+++ b/org/omg/PortableServer/ServantLocatorHelper.java
@@ -115,6 +115,25 @@ public abstract class ServantLocatorHelper
throw bad;
}
}
+
+ /**
+ * Narrow the given object to the ServantLocator. 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 ServantLocator.
+ *
+ * @since 1.5
+ *
+ * @see OMG issue 4158.
+ */
+ public static ServantLocator unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
/**
* This should read the servant locator, but it cannot be transferred