summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java')
-rw-r--r--libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java23
1 files changed, 7 insertions, 16 deletions
diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java b/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java
index 8a93c5895a0..e2a8c905793 100644
--- a/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java
+++ b/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java
@@ -40,6 +40,7 @@ package org.omg.IOP.CodecPackage;
import gnu.CORBA.EmptyExceptionHolder;
import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_OPERATION;
@@ -58,29 +59,19 @@ import org.omg.CORBA.portable.OutputStream;
public abstract class InvalidTypeForEncodingHelper
{
/**
- * The cached typecode value, computed only once.
- */
- private static TypeCode typeCode;
-
- /**
- * Create the InvalidTypeForEncoding typecode (structure,
- * named "InvalidTypeForEncoding").
+ * Create the InvalidTypeForEncoding typecode (structure, named
+ * "InvalidTypeForEncoding").
*/
public static TypeCode type()
{
- if (typeCode == null)
- {
- ORB orb = ORB.init();
- StructMember[] members = new StructMember[ 0 ];
- typeCode =
- orb.create_exception_tc(id(), "InvalidTypeForEncoding", members);
- }
- return typeCode;
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[0];
+ return orb.create_exception_tc(id(), "InvalidTypeForEncoding", members);
}
/**
* Insert the InvalidTypeForEncoding into the given Any.
- *
+ *
* @param any the Any to insert into.
* @param that the InvalidTypeForEncoding to insert.
*/
OpenPOWER on IntegriCloud