aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradinn <none@none>2013-07-02 10:13:55 +0100
committeradinn <none@none>2013-07-02 10:13:55 +0100
commit7494ebf928e4be6fb0a3b8c6b3d0ed1e12bfb7e2 (patch)
tree54a09212f38c04a31f5d0711b24a51285aeccf08
parent77dc3f3d1f0af4b13da0d7b8adddecb2523cfe59 (diff)
parent8175550692ad7b50efe8592cb999ee4ac9d26721 (diff)
-rw-r--r--.hgtags13
-rw-r--r--make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk14
-rw-r--r--makefiles/BuildCorba.gmk6
-rw-r--r--src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java8
-rw-r--r--src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java6
-rw-r--r--src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java5
-rw-r--r--src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java61
-rw-r--r--src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java20
-rw-r--r--src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java8
-rw-r--r--src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java114
-rw-r--r--src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java85
-rw-r--r--src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java10
-rw-r--r--src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java6
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java2
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java57
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java68
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java66
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java38
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java6
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3.java177
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3_1.java177
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3.java108
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3_1.java102
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java53
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java990
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java1065
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3.java251
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3_1.java77
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_de.properties2
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_es.properties2
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_fr.properties2
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_it.properties10
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ja.properties10
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ko.properties2
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_pt_BR.properties2
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_sv.properties2
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_CN.properties2
-rw-r--r--src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties2
-rw-r--r--src/share/classes/com/sun/corba/se/spi/orb/ORB.java34
-rw-r--r--src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp8
-rw-r--r--src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp2
-rw-r--r--src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp4
-rw-r--r--src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp2
-rw-r--r--src/share/classes/sun/corba/JavaCorbaAccess.java (renamed from src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java)32
-rw-r--r--src/share/classes/sun/corba/SharedSecrets.java60
45 files changed, 232 insertions, 3539 deletions
diff --git a/.hgtags b/.hgtags
index aa6cee1..f248f98 100644
--- a/.hgtags
+++ b/.hgtags
@@ -194,3 +194,16 @@ d54dc53e223ed9ce7d5f4d2cd02ad9d5def3c2db jdk8-b59
603cceb495c8133d47b26a7502d51c7d8a67d76b jdk8-b70
8171d23e914d758836527b80b06debcfdb718f2d jdk8-b71
cb40427f47145b01b7e53c3e02b38ff7625efbda initial_upload
+cb40427f47145b01b7e53c3e02b38ff7625efbda jdk8-b72
+191afde59e7be0e1a1d76d06f2a32ff17444f0ec jdk8-b73
+2132845cf5f717ff5c240a2431c0c0e03e66e3a5 jdk8-b74
+d4e68ce17795601017ac2f952baad7272942c36e jdk8-b75
+58be6ca3c0603882a1ec478724e337aac85e0da0 jdk8-b76
+35684a40c5845782324dbcc9ac8969528020ff61 jdk8-b77
+27d6368ae8ba570c31c2f0e696d39c99fa2f4538 jdk8-b78
+e41fb1aa0329767b2737303c994e38bede1baa07 jdk8-b79
+5f3d4a6bdd027a1631d97e2dfff63fd5e46987a4 jdk8-b80
+2a00aeeb466b9dee22508f6261f63b70f9c696fe jdk8-b81
+48e1bc77004d9af575b733c04637b98fd17603c2 jdk8-b82
+a45bb25a67c7517b45f00c9682e317f46fecbba9 jdk8-b83
+928f8b888deb785cbd7bbd5f951cd6880f11f14e jdk8-b84
diff --git a/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk b/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk
index 5009bb5..465c546 100644
--- a/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk
+++ b/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -29,10 +29,6 @@ com_sun_corba_se_impl_orbutil_java = \
com/sun/corba/se/impl/orbutil/DenseIntMapImpl.java \
com/sun/corba/se/impl/orbutil/GetPropertyAction.java \
com/sun/corba/se/impl/orbutil/HexOutputStream.java \
- com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java \
- com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java \
- com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java \
- com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java \
com/sun/corba/se/impl/orbutil/LegacyHookGetFields.java \
com/sun/corba/se/impl/orbutil/LegacyHookPutFields.java \
com/sun/corba/se/impl/orbutil/LogKeywords.java \
@@ -45,19 +41,11 @@ com_sun_corba_se_impl_orbutil_java = \
com/sun/corba/se/impl/orbutil/ORBUtility.java \
com/sun/corba/se/impl/orbutil/ORBClassLoader.java \
com/sun/corba/se/impl/orbutil/RepIdDelegator.java \
- com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3.java \
- com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3_1.java \
- com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3.java \
- com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java \
com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java \
com/sun/corba/se/impl/orbutil/RepositoryIdStrings.java \
com/sun/corba/se/impl/orbutil/RepositoryIdUtility.java \
com/sun/corba/se/impl/orbutil/RepositoryIdInterface.java \
- com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3_1.java \
- com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java \
com/sun/corba/se/impl/orbutil/StackImpl.java \
- com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3_1.java \
- com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3.java \
com/sun/corba/se/impl/orbutil/closure/Future.java \
com/sun/corba/se/impl/orbutil/closure/Constant.java \
com/sun/corba/se/impl/orbutil/concurrent/Sync.java \
diff --git a/makefiles/BuildCorba.gmk b/makefiles/BuildCorba.gmk
index 246c5b9..b177ff2 100644
--- a/makefiles/BuildCorba.gmk
+++ b/makefiles/BuildCorba.gmk
@@ -35,8 +35,6 @@ include MakeBase.gmk
include JavaCompilation.gmk
include IdlCompilation.gmk
-JAVAC_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
- -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
# The Corba sources are old and generates a LOT of warnings.
# Disable these using Xlint, until someone cares to fix them.
DISABLE_CORBA_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,-cast,-rawtypes,-static,-dep-ann
@@ -46,7 +44,7 @@ DISABLE_CORBA_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,
# Thus we force the target bytecode to the boot jdk bytecode.
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
JVM:=$(JAVA),\
- JAVAC:=$(JAVAC_JARS),\
+ JAVAC:=$(NEW_JAVAC),\
FLAGS:=$(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_CORBA_WARNINGS),\
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
@@ -56,7 +54,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
# cannot necessarily be run with the boot jdk.
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\
JVM:=$(JAVA),\
- JAVAC:=$(JAVAC_JARS),\
+ JAVAC:=$(NEW_JAVAC),\
FLAGS:=-cp $(BOOT_TOOLSJAR) -XDignore.symbol.file=true $(DISABLE_CORBA_WARNINGS),\
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
diff --git a/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java b/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java
index c51b089..cd6d534 100644
--- a/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java
+++ b/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -322,9 +322,9 @@ class ServerCallback extends
com.sun.corba.se.spi.activation._ServerImplBase
{
private ORB orb;
- private Method installMethod ;
- private Method uninstallMethod ;
- private Method shutdownMethod ;
+ private transient Method installMethod ;
+ private transient Method uninstallMethod ;
+ private transient Method shutdownMethod ;
private Object methodArgs[] ;
ServerCallback(ORB orb, Method installMethod, Method uninstallMethod,
diff --git a/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java b/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java
index 6b33f34..0177bdd 100644
--- a/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java
+++ b/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1218,7 +1218,7 @@ public class AnyImpl extends Any
// See bug 4391648 for more info about the tcORB in this
// case.
RepositoryIdStrings repStrs
- = RepositoryIdFactory.getRepIdStringsFactory(tcORB);
+ = RepositoryIdFactory.getRepIdStringsFactory();
// Assertion: c instanceof Serializable?
@@ -1251,7 +1251,7 @@ public class AnyImpl extends Any
// Anything else
// We know that this is a TypeCodeImpl since it is our ORB
classTC = (TypeCodeImpl)ValueUtility.createTypeCodeForClass(
- tcORB, c, ORBUtility.createValueHandler(tcORB));
+ tcORB, c, ORBUtility.createValueHandler());
// Intruct classTC to store its buffer
classTC.setCaching(true);
// Update the cache
diff --git a/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java b/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java
index c9b6e55..7e926dd 100644
--- a/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java
+++ b/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java
@@ -2189,10 +2189,7 @@ public final class TypeCodeImpl extends TypeCode
if (labelIndex == _unionLabels.length) {
// check if label has not been found
- if (_defaultIndex == -1)
- // throw exception if default was not expected
- throw wrapper.unexpectedUnionDefault() ;
- else
+ if (_defaultIndex != -1)
// must be of the default branch type
_memberTypes[_defaultIndex].copy(src, dst);
}
diff --git a/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java b/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java
index d17d6f3..a00d66c 100644
--- a/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -269,8 +269,8 @@ public class CDRInputStream_1_0 extends CDRInputStreamBase
private final void createRepositoryIdHandlers()
{
- repIdUtil = RepositoryIdFactory.getRepIdUtility(orb);
- repIdStrs = RepositoryIdFactory.getRepIdStringsFactory(orb);
+ repIdUtil = RepositoryIdFactory.getRepIdUtility();
+ repIdStrs = RepositoryIdFactory.getRepIdStringsFactory();
}
public GIOPVersion getGIOPVersion() {
@@ -564,10 +564,7 @@ public class CDRInputStream_1_0 extends CDRInputStreamBase
checkForNegativeLength(len);
- if (orb != null && ORBUtility.isLegacyORB((ORB)orb))
- return legacyReadString(len);
- else
- return internalReadString(len);
+ return internalReadString(len);
}
private final String internalReadString(int len) {
@@ -588,54 +585,6 @@ public class CDRInputStream_1_0 extends CDRInputStreamBase
return new String(result, 0, getCharConverter().getNumChars());
}
- private final String legacyReadString(int len) {
-
- //
- // Workaround for ORBs which send string lengths of
- // zero to mean empty string.
- //
- //
- // IMPORTANT: Do not replace 'new String("")' with "", it may result
- // in a Serialization bug (See serialization.zerolengthstring) and
- // bug id: 4728756 for details
- if (len == 0)
- return new String("");
-
- len--;
- char[] c = new char[len];
-
- int n = 0;
- while (n < len) {
- int avail;
- int bytes;
- int wanted;
-
- avail = bbwi.buflen - bbwi.position();
- if (avail <= 0) {
- grow(1, 1);
- avail = bbwi.buflen - bbwi.position();
- }
- wanted = len - n;
- bytes = (wanted < avail) ? wanted : avail;
- // Microbenchmarks are showing a loop of ByteBuffer.get(int) being
- // faster than ByteBuffer.get(byte[], int, int).
- for (int i=0; i<bytes; i++) {
- c[n+i] = (char) (bbwi.byteBuffer.get(bbwi.position()+i) & 0xFF);
- }
- bbwi.position(bbwi.position() + bytes);
- n += bytes;
- }
-
- //
- // Skip past terminating null byte
- //
- if (bbwi.position() + 1 > bbwi.buflen)
- alignAndCheck(1, 1);
- bbwi.position(bbwi.position() + 1);
-
- return new String(c);
- }
-
public final String read_string() {
return readStringOrIndirection(false);
}
@@ -1045,7 +994,7 @@ public class CDRInputStream_1_0 extends CDRInputStreamBase
try {
if (valueHandler == null)
- valueHandler = ORBUtility.createValueHandler(orb);
+ valueHandler = ORBUtility.createValueHandler();
value = valueHandler.readValue(parent,
indirection,
diff --git a/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java b/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java
index 25e1528..3e60c48 100644
--- a/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -189,18 +189,8 @@ public class CDROutputStream_1_0 extends CDROutputStreamBase
private final void createRepositoryIdHandlers()
{
- if (orb != null) {
- // Get the appropriate versions based on the ORB version. The
- // ORB versioning info is only in the core ORB.
- repIdUtil
- = RepositoryIdFactory.getRepIdUtility(orb);
- repIdStrs
- = RepositoryIdFactory.getRepIdStringsFactory(orb);
- } else {
- // Get the latest versions
- repIdUtil = RepositoryIdFactory.getRepIdUtility();
- repIdStrs = RepositoryIdFactory.getRepIdStringsFactory();
- }
+ repIdUtil = RepositoryIdFactory.getRepIdUtility();
+ repIdStrs = RepositoryIdFactory.getRepIdStringsFactory();
}
public BufferManagerWrite getBufferManager()
@@ -705,7 +695,7 @@ public class CDROutputStream_1_0 extends CDROutputStreamBase
private void writeArray(Serializable array, Class clazz) {
if (valueHandler == null)
- valueHandler = ORBUtility.createValueHandler(orb); //d11638
+ valueHandler = ORBUtility.createValueHandler(); //d11638
// Write value_tag
int indirection = writeValueTag(mustChunk, true,
@@ -768,7 +758,7 @@ public class CDROutputStream_1_0 extends CDROutputStreamBase
private void writeRMIIIOPValueType(Serializable object, Class clazz) {
if (valueHandler == null)
- valueHandler = ORBUtility.createValueHandler(orb); //d11638
+ valueHandler = ORBUtility.createValueHandler(); //d11638
Serializable key = object;
diff --git a/src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java b/src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java
index f87ef71..c69fb42 100644
--- a/src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java
+++ b/src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -86,7 +86,7 @@ public class FVDCodeBaseImpl extends _CodeBaseImplBase
// default to using the current ORB version in case the
// vhandler is not set
if (vhandler == null) {
- vhandler = new ValueHandlerImpl(false);
+ vhandler = ValueHandlerImpl.getInstance(false);
}
// Util.getCodebase may return null which would
@@ -120,7 +120,7 @@ public class FVDCodeBaseImpl extends _CodeBaseImplBase
// default to using the current ORB version in case the
// vhandler is not set
if (vhandler == null) {
- vhandler = new ValueHandlerImpl(false);
+ vhandler = ValueHandlerImpl.getInstance(false);
}
try{
@@ -161,7 +161,7 @@ public class FVDCodeBaseImpl extends _CodeBaseImplBase
// default to using the current ORB version in case the
// vhandler is not set
if (vhandler == null) {
- vhandler = new ValueHandlerImpl(false);
+ vhandler = ValueHandlerImpl.getInstance(false);
}
Stack repIds = new Stack();
diff --git a/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java b/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java
index c2e23a4..2c6e3bc 100644
--- a/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java
+++ b/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
/*
* Licensed Materials - Property of IBM
* RMI-IIOP v1.0
- * Copyright IBM Corp. 1998 1999 All Rights Reserved
+ * Copyright IBM Corp. 1998 2012 All Rights Reserved
*
*/
@@ -56,7 +56,6 @@ import java.io.Serializable;
import java.util.Arrays;
import java.util.Comparator;
-import java.util.Hashtable;
import com.sun.corba.se.impl.util.RepositoryId;
@@ -83,8 +82,6 @@ public class ObjectStreamClass implements java.io.Serializable {
private static Object noArgsList[] = {};
private static Class noTypesList[] = {};
- private static Hashtable translatedFields;
-
/** true if represents enum type */
private boolean isEnum;
@@ -384,6 +381,42 @@ public class ObjectStreamClass implements java.io.Serializable {
*/
}
+ private static final class PersistentFieldsValue
+ extends ClassValue<ObjectStreamField[]> {
+ PersistentFieldsValue() { }
+
+ protected ObjectStreamField[] computeValue(Class<?> type) {
+ try {
+ Field pf = type.getDeclaredField("serialPersistentFields");
+ int mods = pf.getModifiers();
+ if (Modifier.isPrivate(mods) && Modifier.isStatic(mods) &&
+ Modifier.isFinal(mods)) {
+ pf.setAccessible(true);
+ java.io.ObjectStreamField[] fields =
+ (java.io.ObjectStreamField[])pf.get(type);
+ return translateFields(fields);
+ }
+ } catch (NoSuchFieldException | IllegalAccessException |
+ IllegalArgumentException | ClassCastException e) {
+ }
+ return null;
+ }
+
+ private static ObjectStreamField[] translateFields(
+ java.io.ObjectStreamField[] fields) {
+ ObjectStreamField[] translation =
+ new ObjectStreamField[fields.length];
+ for (int i = 0; i < fields.length; i++) {
+ translation[i] = new ObjectStreamField(fields[i].getName(),
+ fields[i].getType());
+ }
+ return translation;
+ }
+ }
+
+ private static final PersistentFieldsValue persistentFieldsValue =
+ new PersistentFieldsValue();
+
/*
* Initialize class descriptor. This method is only invoked on class
* descriptors created via calls to lookupInternal(). This method is kept
@@ -416,35 +449,7 @@ public class ObjectStreamClass implements java.io.Serializable {
* If it is declared, use the declared serialPersistentFields.
* Otherwise, extract the fields from the class itself.
*/
- try {
- Field pf = cl.getDeclaredField("serialPersistentFields");
- // serial bug 7; the serialPersistentFields were not
- // being read and stored as Accessible bit was not set
- pf.setAccessible(true);
- // serial bug 7; need to find if the field is of type
- // java.io.ObjectStreamField
- java.io.ObjectStreamField[] f =
- (java.io.ObjectStreamField[])pf.get(cl);
- int mods = pf.getModifiers();
- if ((Modifier.isPrivate(mods)) &&
- (Modifier.isStatic(mods)) &&
- (Modifier.isFinal(mods)))
- {
- fields = (ObjectStreamField[])translateFields((Object[])pf.get(cl));
- }
- } catch (NoSuchFieldException e) {
- fields = null;
- } catch (IllegalAccessException e) {
- fields = null;
- } catch (IllegalArgumentException e) {
- fields = null;
- } catch (ClassCastException e) {
- /* Thrown if a field serialPersistentField exists
- * but it is not of type ObjectStreamField.
- */
- fields = null;
- }
-
+ fields = persistentFieldsValue.get(cl);
if (fields == null) {
/* Get all of the declared fields for this
@@ -641,43 +646,6 @@ public class ObjectStreamClass implements java.io.Serializable {
superclass = null;
}
- private static Object[] translateFields(Object objs[])
- throws NoSuchFieldException {
- try{
- java.io.ObjectStreamField fields[] = (java.io.ObjectStreamField[])objs;
- Object translation[] = null;
-
- if (translatedFields == null)
- translatedFields = new Hashtable();
-
- translation = (Object[])translatedFields.get(fields);
-
- if (translation != null)
- return translation;
- else {
- Class osfClass = Class.forName("com.sun.corba.se.impl.io.ObjectStreamField");
- translation = (Object[])java.lang.reflect.Array.newInstance(osfClass, objs.length);
- Object arg[] = new Object[2];
- Class types[] = {String.class, Class.class};
- Constructor constructor = osfClass.getDeclaredConstructor(types);
- for (int i = fields.length -1; i >= 0; i--){
- arg[0] = fields[i].getName();
- arg[1] = fields[i].getType();
-
- translation[i] = constructor.newInstance(arg);
- }
- translatedFields.put(fields, translation);
-
- }
-
- return (Object[])translation;
- }
- catch(Throwable t){
- NoSuchFieldException nsfe = new NoSuchFieldException();
- nsfe.initCause( t ) ;
- throw nsfe ;
- }
- }
/*
* Set the class this version descriptor matches.
@@ -1555,8 +1523,8 @@ public class ObjectStreamClass implements java.io.Serializable {
private boolean hasExternalizableBlockData;
Method writeObjectMethod;
Method readObjectMethod;
- private Method writeReplaceObjectMethod;
- private Method readResolveObjectMethod;
+ private transient Method writeReplaceObjectMethod;
+ private transient Method readResolveObjectMethod;
private Constructor cons ;
/**
diff --git a/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java b/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java
index e1c82cf..fdf3501 100644
--- a/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java
+++ b/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -53,7 +53,7 @@ import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.impl.logging.OMGSystemException;
import com.sun.corba.se.impl.logging.UtilSystemException;
-public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat {
+public final class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat {
// Property to override our maximum stream format version
public static final String FORMAT_VERSION_PROPERTY
@@ -150,14 +150,22 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
writeValueWithVersion(out, value, streamFormatVersion);
}
- public ValueHandlerImpl(){}
+ private ValueHandlerImpl(){}
- public ValueHandlerImpl(boolean isInputStream) {
+ private ValueHandlerImpl(boolean isInputStream) {
this();
useHashtables = false;
this.isInputStream = isInputStream;
}
+ static ValueHandlerImpl getInstance() {
+ return new ValueHandlerImpl();
+ }
+
+ static ValueHandlerImpl getInstance(boolean isInputStream) {
+ return new ValueHandlerImpl(isInputStream);
+ }
+
/**
* Writes the value to the stream using java semantics.
* @param out The stream to write the value to
@@ -458,12 +466,7 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
return ObjectStreamClass.lookup(value.getClass()).writeReplace(value);
}
- /**
- * Encapsulates writing of Java char arrays so that the 1.3 subclass
- * can override it without exposing internals across packages. This
- * is a fix for bug 4367783.
- */
- protected void writeCharArray(org.omg.CORBA_2_3.portable.OutputStream out,
+ private void writeCharArray(org.omg.CORBA_2_3.portable.OutputStream out,
char[] array,
int offset,
int length)
@@ -576,12 +579,7 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
}
}
- /**
- * Encapsulates reading of Java char arrays so that the 1.3 subclass
- * can override it without exposing internals across packages. This
- * is a fix for bug 4367783.
- */
- protected void readCharArray(org.omg.CORBA_2_3.portable.InputStream in,
+ private void readCharArray(org.omg.CORBA_2_3.portable.InputStream in,
char[] array,
int offset,
int length)
@@ -795,7 +793,7 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
return RepositoryId.cache.getId(repId).isSequence();
}
- protected String getOutputStreamClassName() {
+ private String getOutputStreamClassName() {
return "com.sun.corba.se.impl.io.IIOPOutputStream";
}
@@ -843,29 +841,11 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
private IIOPOutputStream createOutputStreamBuiltInNoPriv(
final String name
) throws IOException {
- return
- name.equals(
- IIOPOutputStream
- .class.getName()
- ) ?
- new IIOPOutputStream() :
-
- name.equals(
- com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3
- .class.getName()
- ) ?
- new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3() :
-
- name.equals(
- com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1
- .class.getName()
- ) ?
- new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1() :
-
- null;
+ return name.equals(IIOPOutputStream.class.getName()) ?
+ new IIOPOutputStream() : null;
}
- protected String getInputStreamClassName() {
+ private String getInputStreamClassName() {
return "com.sun.corba.se.impl.io.IIOPInputStream";
}
@@ -913,26 +893,8 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
private IIOPInputStream createInputStreamBuiltInNoPriv(
final String name
) throws IOException {
- return
- name.equals(
- IIOPInputStream
- .class.getName()
- ) ?
- new IIOPInputStream() :
-
- name.equals(
- com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3
- .class.getName()
- ) ?
- new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3() :
-
- name.equals(
- com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1
- .class.getName()
- ) ?
- new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1() :
-
- null;
+ return name.equals(IIOPInputStream.class.getName()) ?
+ new IIOPInputStream() : null;
}
/**
@@ -958,12 +920,7 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat
}
- /**
- * Our JDK 1.3 and JDK 1.3.1 behavior subclasses override this.
- * The correct behavior is for a Java char to map to a CORBA wchar,
- * but our older code mapped it to a CORBA char.
- */
- protected TCKind getJavaCharTCKind() {
+ TCKind getJavaCharTCKind() {
return TCKind.tk_wchar;
}
}
diff --git a/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java b/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java
index 84bb168..41d85a2 100644
--- a/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java
+++ b/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -93,6 +93,14 @@ public class ValueUtility {
null, // tk_abstract_interface 32
};
+ static {
+ sun.corba.SharedSecrets.setJavaCorbaAccess(new sun.corba.JavaCorbaAccess() {
+ public ValueHandlerImpl newValueHandlerImpl() {
+ return ValueHandlerImpl.getInstance();
+ }
+ });
+ }
+
public static String getSignature(ValueMember member)
throws ClassNotFoundException {
diff --git a/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java b/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java
index 7721999..aa2c648 100644
--- a/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java
+++ b/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java
@@ -112,6 +112,9 @@ import com.sun.corba.se.impl.util.JDKBridge;
import com.sun.corba.se.impl.orbutil.ORBClassLoader;
import com.sun.corba.se.impl.logging.UtilSystemException;
import com.sun.corba.se.spi.logging.CORBALogDomains;
+import sun.corba.SharedSecrets;
+import sun.corba.JavaCorbaAccess;
+
/**
* Provides utility methods that can be used by stubs and ties to
@@ -125,7 +128,8 @@ public class Util implements javax.rmi.CORBA.UtilDelegate
// Maps targets to ties.
private static IdentityHashtable exportedServants = new IdentityHashtable();
- private static ValueHandlerImpl valueHandlerSingleton = new ValueHandlerImpl();
+ private static final ValueHandlerImpl valueHandlerSingleton =
+ SharedSecrets.getJavaCorbaAccess().newValueHandlerImpl();
private UtilSystemException utilWrapper = UtilSystemException.get(
CORBALogDomains.RPC_ENCODING);
diff --git a/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java b/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java
index 9c03173..5db8573 100644
--- a/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java
+++ b/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java
@@ -840,7 +840,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
// backward compatability 4365188
CodeBase cb;
- ValueHandler vh = ORBUtility.createValueHandler(this);
+ ValueHandler vh = ORBUtility.createValueHandler();
cb = (CodeBase)vh.getRunTimeCodeBase();
return ORBUtility.connectAndGetIOR( this, cb ) ;
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java b/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java
deleted file mode 100644
index 235d734..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.corba.se.impl.orbutil;
-
-import java.io.*;
-import java.util.Hashtable;
-
-/**
- * Implements legacy behavior from before Ladybird to maintain
- * backwards compatibility.
- */
-public class IIOPInputStream_1_3 extends com.sun.corba.se.impl.io.IIOPInputStream
-{
- // The newer version in the io package correctly reads a wstring instead.
- // This concerns bug 4379597.
- protected String internalReadUTF(org.omg.CORBA.portable.InputStream stream)
- {
- return stream.read_string();
- }
-
- /**
- * Before JDK 1.3.1_01, the PutField/GetField implementation
- * actually sent a Hashtable.
- */
- public ObjectInputStream.GetField readFields()
- throws IOException, ClassNotFoundException, NotActiveException {
- Hashtable fields = (Hashtable)readObject();
- return new LegacyHookGetFields(fields);
- }
-
- public IIOPInputStream_1_3()
- throws java.io.IOException {
- super();
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java b/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java
deleted file mode 100644
index e9d81cd..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.corba.se.impl.orbutil;
-
-import java.io.*;
-
-/**
- * Implements legacy behavior from before Ladybird to maintain
- * backwards compatibility.
- */
-public class IIOPOutputStream_1_3 extends com.sun.corba.se.impl.io.IIOPOutputStream
-{
- // We can't assume that the superclass's putFields
- // member will be non-private. We must allow
- // the RI to run on JDK 1.3.1 FCS as well as
- // the JDK 1.3.1_01 patch.
- private ObjectOutputStream.PutField putFields_1_3;
-
- // The newer version in the io package correctly writes a wstring instead.
- // This concerns bug 4379597.
- protected void internalWriteUTF(org.omg.CORBA.portable.OutputStream stream,
- String data)
- {
- stream.write_string(data);
- }
-
- public IIOPOutputStream_1_3()
- throws java.io.IOException {
- super();
- }
-
- /**
- * Before JDK 1.3.1_01, the PutField/GetField implementation
- * actually sent a Hashtable.
- */
- public ObjectOutputStream.PutField putFields()
- throws IOException {
- putFields_1_3 = new LegacyHookPutFields();
- return putFields_1_3;
- }
-
- public void writeFields()
- throws IOException {
- putFields_1_3.write(this);
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java b/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java
deleted file mode 100644
index 6c7bfd4..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- */
-package com.sun.corba.se.impl.orbutil;
-
-import java.io.*;
-import java.util.Hashtable;
-
-/**
- * Implements legacy behavior from Ladybird to maintain
- * backwards compatibility.
- */
-public class IIOPOutputStream_1_3_1 extends com.sun.corba.se.impl.io.IIOPOutputStream
-{
- // We can't assume that the superclass's putFields
- // member will be non-private. We must allow
- // the RI to run on JDK 1.3.1 FCS as well as
- // the JDK 1.3.1_01 patch.
- private ObjectOutputStream.PutField putFields_1_3_1;
-
- public IIOPOutputStream_1_3_1()
- throws java.io.IOException {
- super();
- }
-
- /**
- * Before JDK 1.3.1_01, the PutField/GetField implementation
- * actually sent a Hashtable.
- */
- public ObjectOutputStream.PutField putFields()
- throws IOException {
-
- putFields_1_3_1 = new LegacyHookPutFields();
- return putFields_1_3_1;
- }
-
- public void writeFields()
- throws IOException {
-
- putFields_1_3_1.write(this);
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java b/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java
index b4cc902..23d51f9 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -160,45 +160,13 @@ public final class ORBUtility {
}
/**
- * Creates the correct ValueHandler for the given ORB,
- * querying ORBVersion information. If the ORB or
- * ORBVersion is null, gets the ValueHandler from
- * Util.createValueHandler.
+ * Return default ValueHandler
*/
- public static ValueHandler createValueHandler(ORB orb) {
-
- if (orb == null)
- return Util.createValueHandler();
-
- ORBVersion version = orb.getORBVersion();
-
- if (version == null)
- return Util.createValueHandler();
-
- if (version.equals(ORBVersionFactory.getOLD()))
- return new ValueHandlerImpl_1_3();
- if (version.equals(ORBVersionFactory.getNEW()))
- return new ValueHandlerImpl_1_3_1();
-
+ public static ValueHandler createValueHandler() {
return Util.createValueHandler();
}
/**
- * Returns true if the given ORB could accurately be determined to be a
- * Kestrel or earlier ORB. Note: If passed the ORBSingleton, this will return
- * false.
- */
- public static boolean isLegacyORB(ORB orb)
- {
- try {
- ORBVersion currentORB = orb.getORBVersion();
- return currentORB.equals( ORBVersionFactory.getOLD() ) ;
- } catch (SecurityException se) {
- return false;
- }
- }
-
- /**
* Returns true if it was accurately determined that the remote ORB is
* a foreign (non-JavaSoft) ORB. Note: If passed the ORBSingleton, this
* will return false.
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java b/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java
index c9a6f8f..891a488 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1119,8 +1119,8 @@ public class ObjectStreamClass_1_3_1 implements java.io.Serializable {
private boolean hasExternalizableBlockData;
Method writeObjectMethod;
Method readObjectMethod;
- private Method writeReplaceObjectMethod;
- private Method readResolveObjectMethod;
+ private transient Method writeReplaceObjectMethod;
+ private transient Method readResolveObjectMethod;
/*
* ObjectStreamClass_1_3_1 that this one was built from.
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3.java b/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3.java
deleted file mode 100644
index c4e2183..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import org.omg.CORBA.ORB;
-import java.io.Serializable;
-import java.util.Hashtable;
-import java.net.MalformedURLException;
-import com.sun.corba.se.impl.io.TypeMismatchException;
-import com.sun.corba.se.impl.util.RepositoryId;
-
-/**
- * Delegates to the RepositoryId_1_3 implementation in
- * com.sun.corba.se.impl.orbutil. This is necessary to
- * overcome the fact that many of RepositoryId's methods
- * are static.
- */
-public final class RepIdDelegator_1_3
- implements RepositoryIdStrings,
- RepositoryIdUtility,
- RepositoryIdInterface
-{
- // RepositoryIdFactory methods
-
- public String createForAnyType(Class type) {
- return RepositoryId_1_3.createForAnyType(type);
- }
-
- public String createForJavaType(Serializable ser)
- throws TypeMismatchException
- {
- return RepositoryId_1_3.createForJavaType(ser);
- }
-
- public String createForJavaType(Class clz)
- throws TypeMismatchException
- {
- return RepositoryId_1_3.createForJavaType(clz);
- }
-
- public String createSequenceRepID(java.lang.Object ser) {
- return RepositoryId_1_3.createSequenceRepID(ser);
- }
-
- public String createSequenceRepID(Class clazz) {
- return RepositoryId_1_3.createSequenceRepID(clazz);
- }
-
- public RepositoryIdInterface getFromString(String repIdString) {
- return new RepIdDelegator_1_3(RepositoryId_1_3.cache.getId(repIdString));
- }
-
- // RepositoryIdUtility methods
-
- public boolean isChunkedEncoding(int valueTag) {
- return RepositoryId.isChunkedEncoding(valueTag);
- }
-
- public boolean isCodeBasePresent(int valueTag) {
- return RepositoryId.isCodeBasePresent(valueTag);
- }
-
- public String getClassDescValueRepId() {
- return RepositoryId_1_3.kClassDescValueRepID;
- }
-
- public String getWStringValueRepId() {
- return RepositoryId_1_3.kWStringValueRepID;
- }
-
- public int getTypeInfo(int valueTag) {
- return RepositoryId.getTypeInfo(valueTag);
- }
-
- public int getStandardRMIChunkedNoRepStrId() {
- return RepositoryId.kPreComputed_StandardRMIChunked_NoRep;
- }
-
- public int getCodeBaseRMIChunkedNoRepStrId() {
- return RepositoryId.kPreComputed_CodeBaseRMIChunked_NoRep;
- }
-
- public int getStandardRMIChunkedId() {
- return RepositoryId.kPreComputed_StandardRMIChunked;
- }
-
- public int getCodeBaseRMIChunkedId() {
- return RepositoryId.kPreComputed_CodeBaseRMIChunked;
- }
-
- public int getStandardRMIUnchunkedId() {
- return RepositoryId.kPreComputed_StandardRMIUnchunked;
- }
-
- public int getCodeBaseRMIUnchunkedId() {
- return RepositoryId.kPreComputed_CodeBaseRMIUnchunked;
- }
-
- public int getStandardRMIUnchunkedNoRepStrId() {
- return RepositoryId.kPreComputed_StandardRMIUnchunked_NoRep;
- }
-
- public int getCodeBaseRMIUnchunkedNoRepStrId() {
- return RepositoryId.kPreComputed_CodeBaseRMIUnchunked_NoRep;
- }
-
- // RepositoryIdInterface methods
-
- public Class getClassFromType() throws ClassNotFoundException {
- return delegate.getClassFromType();
- }
-
- public Class getClassFromType(String codebaseURL)
- throws ClassNotFoundException, MalformedURLException
- {
- return delegate.getClassFromType(codebaseURL);
- }
-
- public Class getClassFromType(Class expectedType,
- String codebaseURL)
- throws ClassNotFoundException, MalformedURLException
- {
- return delegate.getClassFromType(expectedType, codebaseURL);
- }
-
- public String getClassName() {
- return delegate.getClassName();
- }
-
- // Constructor used for factory/utility cases
- public RepIdDelegator_1_3() {}
-
- // Constructor used by getIdFromString. All non-static
- // RepositoryId methods will use the provided delegate.
- private RepIdDelegator_1_3(RepositoryId_1_3 _delegate) {
- this.delegate = _delegate;
- }
-
- private RepositoryId_1_3 delegate = null;
-
- public String toString() {
- if (delegate != null)
- return delegate.toString();
- else
- return this.getClass().getName();
- }
-
- public boolean equals(Object obj) {
- if (delegate != null)
- return delegate.equals(obj);
- else
- return super.equals(obj);
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3_1.java b/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3_1.java
deleted file mode 100644
index dc1195f..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3_1.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import org.omg.CORBA.ORB;
-import java.io.Serializable;
-import java.util.Hashtable;
-import java.net.MalformedURLException;
-import com.sun.corba.se.impl.io.TypeMismatchException;
-import com.sun.corba.se.impl.util.RepositoryId;
-
-/**
- * Delegates to the RepositoryId_1_3_1 implementation in
- * com.sun.corba.se.impl.orbutil. This is necessary to
- * overcome the fact that many of RepositoryId's methods
- * are static.
- */
-public final class RepIdDelegator_1_3_1
- implements RepositoryIdStrings,
- RepositoryIdUtility,
- RepositoryIdInterface
-{
- // RepositoryIdFactory methods
-
- public String createForAnyType(Class type) {
- return RepositoryId_1_3_1.createForAnyType(type);
- }
-
- public String createForJavaType(Serializable ser)
- throws TypeMismatchException
- {
- return RepositoryId_1_3_1.createForJavaType(ser);
- }
-
- public String createForJavaType(Class clz)
- throws TypeMismatchException
- {
- return RepositoryId_1_3_1.createForJavaType(clz);
- }
-
- public String createSequenceRepID(java.lang.Object ser) {
- return RepositoryId_1_3_1.createSequenceRepID(ser);
- }
-
- public String createSequenceRepID(Class clazz) {
- return RepositoryId_1_3_1.createSequenceRepID(clazz);
- }
-
- public RepositoryIdInterface getFromString(String repIdString) {
- return new RepIdDelegator_1_3_1(RepositoryId_1_3_1.cache.getId(repIdString));
- }
-
- // RepositoryIdUtility methods
-
- public boolean isChunkedEncoding(int valueTag) {
- return RepositoryId.isChunkedEncoding(valueTag);
- }
-
- public boolean isCodeBasePresent(int valueTag) {
- return RepositoryId.isCodeBasePresent(valueTag);
- }
-
- public String getClassDescValueRepId() {
- return RepositoryId_1_3_1.kClassDescValueRepID;
- }
-
- public String getWStringValueRepId() {
- return RepositoryId_1_3_1.kWStringValueRepID;
- }
-
- public int getTypeInfo(int valueTag) {
- return RepositoryId.getTypeInfo(valueTag);
- }
-
- public int getStandardRMIChunkedNoRepStrId() {
- return RepositoryId.kPreComputed_StandardRMIChunked_NoRep;
- }
-
- public int getCodeBaseRMIChunkedNoRepStrId() {
- return RepositoryId.kPreComputed_CodeBaseRMIChunked_NoRep;
- }
-
- public int getStandardRMIChunkedId() {
- return RepositoryId.kPreComputed_StandardRMIChunked;
- }
-
- public int getCodeBaseRMIChunkedId() {
- return RepositoryId.kPreComputed_CodeBaseRMIChunked;
- }
-
- public int getStandardRMIUnchunkedId() {
- return RepositoryId.kPreComputed_StandardRMIUnchunked;
- }
-
- public int getCodeBaseRMIUnchunkedId() {
- return RepositoryId.kPreComputed_CodeBaseRMIUnchunked;
- }
-
- public int getStandardRMIUnchunkedNoRepStrId() {
- return RepositoryId.kPreComputed_StandardRMIUnchunked_NoRep;
- }
-
- public int getCodeBaseRMIUnchunkedNoRepStrId() {
- return RepositoryId.kPreComputed_CodeBaseRMIUnchunked_NoRep;
- }
-
- // RepositoryIdInterface methods
-
- public Class getClassFromType() throws ClassNotFoundException {
- return delegate.getClassFromType();
- }
-
- public Class getClassFromType(String codebaseURL)
- throws ClassNotFoundException, MalformedURLException
- {
- return delegate.getClassFromType(codebaseURL);
- }
-
- public Class getClassFromType(Class expectedType,
- String codebaseURL)
- throws ClassNotFoundException, MalformedURLException
- {
- return delegate.getClassFromType(expectedType, codebaseURL);
- }
-
- public String getClassName() {
- return delegate.getClassName();
- }
-
- // Constructor used for factory/utility cases
- public RepIdDelegator_1_3_1() {}
-
- // Constructor used by getIdFromString. All non-static
- // RepositoryId methods will use the provided delegate.
- private RepIdDelegator_1_3_1(RepositoryId_1_3_1 _delegate) {
- this.delegate = _delegate;
- }
-
- private RepositoryId_1_3_1 delegate = null;
-
- public String toString() {
- if (delegate != null)
- return delegate.toString();
- else
- return this.getClass().getName();
- }
-
- public boolean equals(Object obj) {
- if (delegate != null)
- return delegate.equals(obj);
- else
- return super.equals(obj);
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3.java b/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3.java
deleted file mode 100644
index 3a35b33..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Licensed Materials - Property of IBM
- * RMI-IIOP v1.0
- * Copyright IBM Corp. 1998 1999 All Rights Reserved
- *
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import java.util.Stack;
-import java.util.Hashtable;
-import java.util.EmptyStackException;
-import java.util.Enumeration;
-
-// Really limited pool - in this case just creating several at a time...
-class RepositoryIdPool_1_3 extends Stack {
-
- private static int MAX_CACHE_SIZE = 4;
- private RepositoryIdCache_1_3 cache;
-
- public final synchronized RepositoryId_1_3 popId() {
-
- try {
- return (RepositoryId_1_3)super.pop();
- }
- catch(EmptyStackException e) {
- increasePool(5);
- return (RepositoryId_1_3)super.pop();
- }
-
- }
-
- // Pool management
- final void increasePool(int size) {
- //if (cache.size() <= MAX_CACHE_SIZE)
- for (int i = size; i > 0; i--)
- push(new RepositoryId_1_3());
- /*
- // _REVISIT_ This will not work w/out either thread tracing or weak references. I am
- // betting that thread tracing almost completely negates benefit of reuse. Until either
- // 1.2 only inclusion or proof to the contrary, I'll leave it this way...
- else {
- int numToReclaim = cache.size() / 2;
- Enumeration keys = cache.keys();
- Enumeration elements = cache.elements();
- for (int i = numToReclaim; i > 0; i--) {
- Object key = keys.nextElement();
- Object element = elements.nextElement();
-
- push(element);
- cache.remove(key);
- }
- }
- */
- }
-
- final void setCaches(RepositoryIdCache_1_3 cache) {
- this.cache = cache;
- }
-
-}
-
-public class RepositoryIdCache_1_3 extends Hashtable {
-
- private RepositoryIdPool_1_3 pool = new RepositoryIdPool_1_3();
-
- public RepositoryIdCache_1_3() {
- pool.setCaches(this);
- }
-
- public final synchronized RepositoryId_1_3 getId(String key) {
- RepositoryId_1_3 repId = (RepositoryId_1_3)super.get(key);
-
- if (repId != null)
- return repId;
- else {
- //repId = pool.popId().init(key);
- repId = new RepositoryId_1_3(key);
- put(key, repId);
- return repId;
- }
-
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3_1.java b/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3_1.java
deleted file mode 100644
index 11acc5b..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3_1.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import java.util.Stack;
-import java.util.Hashtable;
-import java.util.EmptyStackException;
-import java.util.Enumeration;
-
-// Really limited pool - in this case just creating several at a time...
-class RepositoryIdPool_1_3_1 extends Stack {
-
- private static int MAX_CACHE_SIZE = 4;
- private RepositoryIdCache_1_3_1 cache;
-
- public final synchronized RepositoryId_1_3_1 popId() {
-
- try {
- return (RepositoryId_1_3_1)super.pop();
- }
- catch(EmptyStackException e) {
- increasePool(5);
- return (RepositoryId_1_3_1)super.pop();
- }
-
- }
-
- // Pool management
- final void increasePool(int size) {
- //if (cache.size() <= MAX_CACHE_SIZE)
- for (int i = size; i > 0; i--)
- push(new RepositoryId_1_3_1());
- /*
- // _REVISIT_ This will not work w/out either thread tracing or weak references. I am
- // betting that thread tracing almost completely negates benefit of reuse. Until either
- // 1.2 only inclusion or proof to the contrary, I'll leave it this way...
- else {
- int numToReclaim = cache.size() / 2;
- Enumeration keys = cache.keys();
- Enumeration elements = cache.elements();
- for (int i = numToReclaim; i > 0; i--) {
- Object key = keys.nextElement();
- Object element = elements.nextElement();
-
- push(element);
- cache.remove(key);
- }
- }
- */
- }
-
- final void setCaches(RepositoryIdCache_1_3_1 cache) {
- this.cache = cache;
- }
-
-}
-
-public class RepositoryIdCache_1_3_1 extends Hashtable {
-
- private RepositoryIdPool_1_3_1 pool = new RepositoryIdPool_1_3_1();
-
- public RepositoryIdCache_1_3_1() {
- pool.setCaches(this);
- }
-
- public final synchronized RepositoryId_1_3_1 getId(String key) {
- RepositoryId_1_3_1 repId = (RepositoryId_1_3_1)super.get(key);
-
- if (repId != null)
- return repId;
- else {
- //repId = pool.popId().init(key);
- repId = new RepositoryId_1_3_1(key);
- put(key, repId);
- return repId;
- }
-
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java b/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java
index 3501468..5f3a237 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,12 +30,6 @@ import com.sun.corba.se.spi.orb.ORB;
public abstract class RepositoryIdFactory
{
- private static final RepIdDelegator_1_3 legacyDelegator
- = new RepIdDelegator_1_3();
-
- private static final RepIdDelegator_1_3_1 ladybirdDelegator
- = new RepIdDelegator_1_3_1();
-
private static final RepIdDelegator currentDelegator
= new RepIdDelegator();
@@ -48,29 +42,6 @@ public abstract class RepositoryIdFactory
}
/**
- * Checks the version of the ORB and returns the appropriate
- * RepositoryIdStrings instance.
- */
- public static RepositoryIdStrings getRepIdStringsFactory(ORB orb)
- {
- if (orb != null) {
- switch (orb.getORBVersion().getORBType()) {
- case ORBVersion.NEWER:
- case ORBVersion.FOREIGN:
- case ORBVersion.JDK1_3_1_01:
- return currentDelegator;
- case ORBVersion.OLD:
- return legacyDelegator;
- case ORBVersion.NEW:
- return ladybirdDelegator;
- default:
- return currentDelegator;
- }
- } else
- return currentDelegator;
- }
-
- /**
* Returns the latest version RepositoryIdUtility instance
*/
public static RepositoryIdUtility getRepIdUtility()
@@ -78,26 +49,4 @@ public abstract class RepositoryIdFactory
return currentDelegator;
}
- /**
- * Checks the version of the ORB and returns the appropriate
- * RepositoryIdUtility instance.
- */
- public static RepositoryIdUtility getRepIdUtility(ORB orb)
- {
- if (orb != null) {
- switch (orb.getORBVersion().getORBType()) {
- case ORBVersion.NEWER:
- case ORBVersion.FOREIGN:
- case ORBVersion.JDK1_3_1_01:
- return currentDelegator;
- case ORBVersion.OLD:
- return legacyDelegator;
- case ORBVersion.NEW:
- return ladybirdDelegator;
- default:
- return currentDelegator;
- }
- } else
- return currentDelegator;
- }
}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java b/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java
deleted file mode 100644
index 8cf9edd..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java
+++ /dev/null
@@ -1,990 +0,0 @@
-/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Licensed Materials - Property of IBM
- * RMI-IIOP v1.0
- * Copyright IBM Corp. 1998 1999 All Rights Reserved
- *
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import java.util.StringTokenizer;
-import java.util.Hashtable;
-import java.io.IOException;
-import java.lang.reflect.Method;
-
-// Imports for using codebase URL to load class
-import java.net.MalformedURLException;
-import org.omg.CORBA.portable.ValueBase;
-import org.omg.CORBA.portable.IDLEntity;
-
-import com.sun.corba.se.impl.util.JDKBridge;
-import com.sun.corba.se.impl.util.Utility;
-import com.sun.corba.se.impl.util.PackagePrefixChecker;
-import com.sun.corba.se.impl.util.IdentityHashtable;
-import com.sun.corba.se.impl.io.ObjectStreamClass;
-
-import javax.rmi.CORBA.Util;
-
-// keeping the original RepositoryId class that was shipped in
-// JDK 1.3. It has interoperability bugs
-
-public class RepositoryId_1_3 {
-
- // Legal IDL Identifier characters (1 = legal). Note
- // that '.' (2E) is marked as legal even though it is
- // not legal in IDL. This allows us to treat a fully
- // qualified Java name with '.' package separators
- // uniformly, and is safe because that is the only
- // legal use of '.' in a Java name.
-
- public static final RepositoryIdCache_1_3 cache = new RepositoryIdCache_1_3();
- private static final byte[] IDL_IDENTIFIER_CHARS = {
-
- // 0 1 2 3 4 5 6 7 8 9 a b c d e f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 00-0f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 10-1f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,1,0, // 20-2f
- 1,1,1,1, 1,1,1,1, 1,1,0,0, 0,0,0,0, // 30-3f
- 0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 40-4f
- 1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,1, // 50-5f
- 0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 60-6f
- 1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,0, // 70-7f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 80-8f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 90-9f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // a0-af
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // b0-bf
- 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // c0-cf
- 0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // d0-df
- 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // e0-ef
- 0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // f0-ff
- };
-
- private static String defaultServerURL = null;
- private static boolean useCodebaseOnly = false;
-
- static {
- if (defaultServerURL == null)
- defaultServerURL = (String)JDKBridge.getLocalCodebase();
- useCodebaseOnly = JDKBridge.useCodebaseOnly();
-
- }
-
- private static IdentityHashtable classToRepStr = new IdentityHashtable();
- private static IdentityHashtable classIDLToRepStr = new IdentityHashtable();
- private static IdentityHashtable classSeqToRepStr = new IdentityHashtable();
-
- private static IdentityHashtable repStrToByteArray = new IdentityHashtable();
- private static Hashtable repStrToClass = new Hashtable();
-
- private String repId = null;
- private boolean isSupportedFormat = true;
- private String typeString = null;
- private String versionString = null;
- private boolean isSequence = false;
- private boolean isRMIValueType = false;
- private boolean isIDLType = false;
- private String completeClassName = null;
- private String unqualifiedName = null;
- private String definedInId = null;
- private Class clazz = null;
- private String suid = null, actualSuid = null;
- private long suidLong = ObjectStreamClass.kDefaultUID, actualSuidLong = ObjectStreamClass.kDefaultUID;
-
- // Repository ID fragments
- private static final String kValuePrefix = "RMI:";
- private static final String kIDLPrefix = "IDL:";
- private static final String kIDLNamePrefix = "omg.org/";
- private static final String kIDLClassnamePrefix = "org.omg.";
- private static final String kSequencePrefix = "[";
- private static final String kCORBAPrefix = "CORBA/";
- private static final String kArrayPrefix = kValuePrefix + kSequencePrefix + kCORBAPrefix;
- private static final int kValuePrefixLength = kValuePrefix.length();
- private static final int kIDLPrefixLength = kIDLPrefix.length();
- private static final int kSequencePrefixLength = kSequencePrefix.length();
- private static final String kInterfaceHashCode = ":0000000000000000";
- private static final String kInterfaceOnlyHashStr = "0000000000000000";
- private static final String kExternalizableHashStr = "0000000000000001";
-
- // Value tag utility methods and constants
- public static final int kInitialValueTag= 0x7fffff00;
- public static final int kNoTypeInfo = 0;
- public static final int kSingleRepTypeInfo = 0x02;
- public static final int kPartialListTypeInfo = 0x06;
- public static final int kChunkedMask = 0x08;
-
- // Public, well known repository IDs
-
- // _REVISIT_ : A table structure with a good search routine for all of this
- // would be more efficient and easier to maintain...
-
- // String
- public static final String kWStringValueVersion = "1.0";
- public static final String kWStringValueHash = ":"+kWStringValueVersion;
- public static final String kWStringStubValue = "WStringValue";
- public static final String kWStringTypeStr = "omg.org/CORBA/"+kWStringStubValue;
- public static final String kWStringValueRepID = kIDLPrefix + kWStringTypeStr + kWStringValueHash;
-
- // Any
- public static final String kAnyRepID = kIDLPrefix + "omg.org/CORBA/Any";
-
- // Class
- public static final String kClassDescValueHash = ":" + Long.toHexString(
- ObjectStreamClass.getSerialVersionUID(javax.rmi.CORBA.ClassDesc.class));
- public static final String kClassDescStubValue = "ClassDesc";
- public static final String kClassDescTypeStr = "javax.rmi.CORBA."+kClassDescStubValue;
- public static final String kClassDescValueRepID = kValuePrefix + kClassDescTypeStr + kClassDescValueHash;
-
- // Object
- public static final String kObjectValueHash = ":1.0";
- public static final String kObjectStubValue = "Object";
-
- // Sequence
- public static final String kSequenceValueHash = ":1.0";
- public static final String kPrimitiveSequenceValueHash = ":0000000000000000";
-
- // Serializable
- public static final String kSerializableValueHash = ":1.0";
- public static final String kSerializableStubValue = "Serializable";
-
- // Externalizable
- public static final String kExternalizableValueHash = ":1.0";
- public static final String kExternalizableStubValue = "Externalizable";
-
- // Remote (The empty string is used for java.rmi.Remote)
- public static final String kRemoteValueHash = "";
- public static final String kRemoteStubValue = "";
- public static final String kRemoteTypeStr = "";
- public static final String kRemoteValueRepID = "";
-
- private static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
-
- static {
- kSpecialArrayTypeStrings.put("CORBA.WStringValue", new StringBuffer(java.lang.String.class.getName()));
- kSpecialArrayTypeStrings.put("javax.rmi.CORBA.ClassDesc", new StringBuffer(java.lang.Class.class.getName()));
- kSpecialArrayTypeStrings.put("CORBA.Object", new StringBuffer(java.rmi.Remote.class.getName()));
-
- }
-
- private static final Hashtable kSpecialCasesRepIDs = new Hashtable();
-
- static {
- kSpecialCasesRepIDs.put(java.lang.String.class, kWStringValueRepID);
- kSpecialCasesRepIDs.put(java.lang.Class.class, kClassDescValueRepID);
- kSpecialCasesRepIDs.put(java.rmi.Remote.class, kRemoteValueRepID);
- }
-
- private static final Hashtable kSpecialCasesStubValues = new Hashtable();
-
- static {
- kSpecialCasesStubValues.put(java.lang.String.class, kWStringStubValue);
- kSpecialCasesStubValues.put(java.lang.Class.class, kClassDescStubValue);
- kSpecialCasesStubValues.put(java.lang.Object.class, kObjectStubValue);
- kSpecialCasesStubValues.put(java.io.Serializable.class, kSerializableStubValue);
- kSpecialCasesStubValues.put(java.io.Externalizable.class, kExternalizableStubValue);
- kSpecialCasesStubValues.put(java.rmi.Remote.class, kRemoteStubValue);
- }
-
-
- private static final Hashtable kSpecialCasesVersions = new Hashtable();
-
- static {
- kSpecialCasesVersions.put(java.lang.String.class, kWStringValueHash);
- kSpecialCasesVersions.put(java.lang.Class.class, kClassDescValueHash);
- kSpecialCasesVersions.put(java.lang.Object.class, kObjectValueHash);
- kSpecialCasesVersions.put(java.io.Serializable.class, kSerializableValueHash);
- kSpecialCasesVersions.put(java.io.Externalizable.class, kExternalizableValueHash);
- kSpecialCasesVersions.put(java.rmi.Remote.class, kRemoteValueHash);
- }
-
- private static final Hashtable kSpecialCasesClasses = new Hashtable();
-
- static {
- kSpecialCasesClasses.put(kWStringTypeStr, java.lang.String.class);
- kSpecialCasesClasses.put(kClassDescTypeStr, java.lang.Class.class);
- kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
-
- kSpecialCasesClasses.put("org.omg.CORBA.WStringValue", java.lang.String.class);
- kSpecialCasesClasses.put("javax.rmi.CORBA.ClassDesc", java.lang.Class.class);
- //kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
- }
-
- private static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
-
- static {
- kSpecialCasesArrayPrefix.put(java.lang.String.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
- kSpecialCasesArrayPrefix.put(java.lang.Class.class, kValuePrefix + kSequencePrefix + "javax/rmi/CORBA/");
- kSpecialCasesArrayPrefix.put(java.lang.Object.class, kValuePrefix + kSequencePrefix + "java/lang/");
- kSpecialCasesArrayPrefix.put(java.io.Serializable.class, kValuePrefix + kSequencePrefix + "java/io/");
- kSpecialCasesArrayPrefix.put(java.io.Externalizable.class, kValuePrefix + kSequencePrefix + "java/io/");
- kSpecialCasesArrayPrefix.put(java.rmi.Remote.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
- }
-
- private static final Hashtable kSpecialPrimitives = new Hashtable();
-
- static {
- kSpecialPrimitives.put("int","long");
- kSpecialPrimitives.put("long","longlong");
- kSpecialPrimitives.put("byte","octet");
- }
-
- /**
- * Used to convert ascii to hex.
- */
- private static final byte ASCII_HEX[] = {
- (byte)'0',
- (byte)'1',
- (byte)'2',
- (byte)'3',
- (byte)'4',
- (byte)'5',
- (byte)'6',
- (byte)'7',
- (byte)'8',
- (byte)'9',
- (byte)'A',
- (byte)'B',
- (byte)'C',
- (byte)'D',
- (byte)'E',
- (byte)'F',
- };
-
-
- // Interface Rep ID Strings
- public static final String kjava_rmi_Remote = createForAnyType(java.rmi.Remote.class);
- public static final String korg_omg_CORBA_Object = createForAnyType(org.omg.CORBA.Object.class);
-
- // Dummy arguments for getIdFromHelper method
- public static final Class kNoParamTypes[] ={};
- public static final Object kNoArgs[] = {};
-
-
- RepositoryId_1_3(){}
-
- RepositoryId_1_3(String aRepId){
- init(aRepId);
- }
-
- RepositoryId_1_3 init(String aRepId){
-
- this.repId = aRepId;
-
- // Special case for remote
- if (aRepId.length() == 0) {
- clazz = java.rmi.Remote.class;
- typeString = "";
- isRMIValueType = true;
- suid = kInterfaceOnlyHashStr;
- return this;
- }
- else if (aRepId.equals(kWStringValueRepID)) {
- clazz = java.lang.String.class;
- typeString = kWStringTypeStr;
- isIDLType = true;
- versionString = kWStringValueVersion;
- return this;
- }
- else {
-
- String repId = convertFromISOLatin1(aRepId);
-
- versionString = repId.substring(repId.indexOf(':', repId.indexOf(':')+1));
- if (repId.startsWith(kIDLPrefix)) {
- typeString =
- repId.substring(kIDLPrefixLength, repId.indexOf(':', kIDLPrefixLength));
- isIDLType = true;
- if (typeString.startsWith(kIDLNamePrefix))
- completeClassName = kIDLClassnamePrefix +
- typeString.substring(kIDLNamePrefix.length()).replace('/','.');
- else completeClassName = typeString.replace('/','.');
-
- }
- else if (repId.startsWith(kValuePrefix)) {
- typeString =
- repId.substring(kValuePrefixLength, repId.indexOf(':', kValuePrefixLength));
- isRMIValueType = true;
-
- if (versionString.indexOf('.') == -1) {
- actualSuid = versionString.substring(1);
- suid = actualSuid; // default if not explicitly specified
-
- if (actualSuid.indexOf(':') != -1){
- // we have a declared hash also
- int pos = actualSuid.indexOf(':')+1;
- // actualSuid = suid.substring(pos);
- // suid = suid.substring(0, pos-1);
- suid = actualSuid.substring(pos);
- actualSuid = actualSuid.substring(0, pos-1);
- }
-
- }
- else {
- // _REVISIT_ : Special case version failure ?
- }
- }
- else isSupportedFormat = false;
-
- if (typeString.startsWith(kSequencePrefix)) {
- isSequence = true;
- }
-
-
- return this;
- }
- }
-
- public final String getUnqualifiedName() {
- if (unqualifiedName == null){
- String className = getClassName();
- int index = (className != null) ? className.lastIndexOf('.') : -1;
- if (index == -1){
- unqualifiedName = className;
- definedInId = "IDL::1.0";
- }
- else {
- unqualifiedName = className.substring(index);
- definedInId = "IDL:" + className.substring(0, index).replace('.','/') + ":1.0";
- }
- }
-
- return unqualifiedName;
- }
-
- public final String getDefinedInId() {
- if (definedInId == null){
- getUnqualifiedName();
- }
-
- return definedInId;
- }
-
- public final String getTypeString() {
- return typeString;
- }
-
- public final String getVersionString() {
- return versionString;
- }
-
- public final String getSerialVersionUID() {
- return suid;
- }
-
- public final String getActualSerialVersionUID() {
- return actualSuid;
- }
- public final long getSerialVersionUIDAsLong() {
- return suidLong;
- }
-
- public final long getActualSerialVersionUIDAsLong() {
- return actualSuidLong;
- }
-
- public final boolean isRMIValueType() {
- return isRMIValueType;
- }
-
- public final boolean isIDLType() {
- return isIDLType;
- }
-
- public final String getRepositoryId() {
- return repId;
- }
-
- public static byte[] getByteArray(String repStr) {
- synchronized (repStrToByteArray){
- return (byte[]) repStrToByteArray.get(repStr);
- }
- }
-
- public static void setByteArray(String repStr, byte[] repStrBytes) {
- synchronized (repStrToByteArray){
- repStrToByteArray.put(repStr, repStrBytes);
- }
- }
-
- public final boolean isSequence() {
- return isSequence;
- }
-
- public final boolean isSupportedFormat() {
- return isSupportedFormat;
- }
-
-
- // This method will return the classname from the typestring OR if the classname turns out to be
- // a special class "pseudo" name, then the matching real classname is returned.
- public final String getClassName() {
-
- if (isRMIValueType)
- return typeString;
- else if (isIDLType)
- return completeClassName;
- else return null;
-
- }
-
- // This method calls getClazzFromType() and falls back to the repStrToClass
- // cache if no class was found. It's used where any class matching the
- // given repid is an acceptable result.
- public final Class getAnyClassFromType() throws ClassNotFoundException {
- try {
- return getClassFromType();
- } catch (ClassNotFoundException cnfe) {
- Class clz = (Class)repStrToClass.get(repId);
- if (clz != null)
- return clz;
- else
- throw cnfe;
- }
- }
-
- public final Class getClassFromType()
- throws ClassNotFoundException {
- if (clazz != null)
- return clazz;
-
- Class specialCase = (Class)kSpecialCasesClasses.get(getClassName());
-
- if (specialCase != null){
- clazz = specialCase;
- return specialCase;
- }
- else
- {
- try{
- return Util.loadClass(getClassName(), null, null);
- }
- catch(ClassNotFoundException cnfe){
- if (defaultServerURL != null) {
- try{
- return getClassFromType(defaultServerURL);
- }
- catch(MalformedURLException mue){
- throw cnfe;
- }
- }
- else throw cnfe;
- }
- }
-
- }
-
- public final Class getClassFromType(Class expectedType, String codebase)
- throws ClassNotFoundException {
- if (clazz != null)
- return clazz;
-
- Class specialCase = (Class)kSpecialCasesClasses.get(getClassName());
-
- if (specialCase != null){
- clazz = specialCase;
- return specialCase;
- } else {
- ClassLoader expectedTypeClassLoader = (expectedType == null ? null : expectedType.getClassLoader());
- return loadClassOfType(getClassName(),
- codebase,
- expectedTypeClassLoader,
- expectedType,
- expectedTypeClassLoader);
- }
-
- }
-
- public final Class getClassFromType(String url)
- throws ClassNotFoundException, MalformedURLException {
- return Util.loadClass(getClassName(), url, null);
- }
-
- public final String toString() {
- return repId;
- }
-
- private static String createHashString(java.io.Serializable ser) {
-
- return createHashString(ser.getClass());
- }
-
- private static String createHashString(java.lang.Class clazz) {
-
- if (clazz.isInterface() || !java.io.Serializable.class.isAssignableFrom(clazz))
- return kInterfaceHashCode;
-
-
- long actualLong = ObjectStreamClassUtil_1_3.computeStructuralUID(false, clazz);
- String hash = null;
- if (actualLong == 0)
- hash = kInterfaceOnlyHashStr;
- else if (actualLong == 1)
- hash = kExternalizableHashStr;
- else
- hash = Long.toHexString(actualLong).toUpperCase();
- while(hash.length() < 16){
- hash = "0" + hash;
- }
-
- long declaredLong = ObjectStreamClassUtil_1_3.computeSerialVersionUID(clazz);
- String declared = null;
- if (declaredLong == 0)
- declared = kInterfaceOnlyHashStr;
- else if (declaredLong == 1)
- declared = kExternalizableHashStr;
- else
- declared = Long.toHexString(declaredLong).toUpperCase();
- while (declared.length() < 16){
- declared = "0" + declared;
- }
- hash = hash + ":" + declared;
-
- return ":" + hash;
- }
-
- /**
- * Creates a repository ID for a sequence. This is for expert users only as
- * this method assumes the object passed is an array. If passed an object
- * that is not an array, it will produce a rep id for a sequence of zero
- * length. This would be an error.
- * @param ser The Java object to create a repository ID for
- **/
- public static String createSequenceRepID(java.lang.Object ser){
- return createSequenceRepID(ser.getClass());
- }
-
- /**
- * Creates a repository ID for a sequence. This is for expert users only as
- * this method assumes the object passed is an array. If passed an object
- * that is not an array, it will produce a malformed rep id.
- * @param clazz The Java class to create a repository ID for
- **/
- public static String createSequenceRepID(java.lang.Class clazz){
- synchronized (classSeqToRepStr){
-
- String repid = (String)classSeqToRepStr.get(clazz);
- if (repid != null)
- return repid;
-
- Class originalClazz = clazz;
-
- Class type = null;
- int numOfDims = 0;
-
- while ((type = clazz.getComponentType()) != null) {
- numOfDims++;
- clazz = type;
- }
-
- if (clazz.isPrimitive())
- repid = kValuePrefix + originalClazz.getName() + kPrimitiveSequenceValueHash;
- else {
- StringBuffer buf = new StringBuffer();
- buf.append(kValuePrefix);
- while(numOfDims-- > 0) {
- buf.append("[");
- }
- buf.append("L");
- buf.append(convertToISOLatin1(clazz.getName()));
- buf.append(";");
- buf.append(createHashString(clazz));
- repid = buf.toString();
- }
- classSeqToRepStr.put(originalClazz,repid);
- return repid;
- }
-
- }
-
-
- public static String createForSpecialCase(java.lang.Class clazz){
- if (clazz.isArray()){
- return createSequenceRepID(clazz);
- }
- else {
- return (String)kSpecialCasesRepIDs.get(clazz);
- }
- }
-
- public static String createForSpecialCase(java.io.Serializable ser){
- Class clazz = ser.getClass();
- if (clazz.isArray()){
- return createSequenceRepID(ser);
- }
- else
- return createForSpecialCase(clazz);
- }
-
- /**
- * Creates a repository ID for a normal Java Type.
- * @param ser The Java object to create a repository ID for
- * @exception com.sun.corba.se.impl.io.TypeMismatchException if ser implements the
- * org.omg.CORBA.portable.IDLEntity interface which indicates it is an IDL Value type.
- **/
- public static String createForJavaType(java.io.Serializable ser)
- throws com.sun.corba.se.impl.io.TypeMismatchException
- {
- synchronized (classToRepStr) {
- String repid = createForSpecialCase(ser);
- if (repid != null)
- return repid;
- Class clazz = ser.getClass();
- repid = (String)classToRepStr.get(clazz);
-
- if (repid != null)
- return repid;
-
- repid = kValuePrefix + convertToISOLatin1(clazz.getName()) +
- createHashString(clazz);
-
- classToRepStr.put(clazz, repid);
- repStrToClass.put(repid, clazz);
- return repid;
- }
- }
-
- /**
- * Creates a repository ID for a normal Java Type.
- * @param clz The Java class to create a repository ID for
- * @exception com.sun.corba.se.impl.io.TypeMismatchException if ser implements the
- * org.omg.CORBA.portable.IDLEntity interface which indicates it is an IDL Value type.
- **/
- public static String createForJavaType(Class clz)
- throws com.sun.corba.se.impl.io.TypeMismatchException
- {
- synchronized (classToRepStr){
- String repid = createForSpecialCase(clz);
- if (repid != null)
- return repid;
-
- repid = (String)classToRepStr.get(clz);
- if (repid != null)
- return repid;
-
- repid = kValuePrefix + convertToISOLatin1(clz.getName()) +
- createHashString(clz);
-
- classToRepStr.put(clz, repid);
- repStrToClass.put(repid, clz);
- return repid;
- }
- }
-
- /**
- * Creates a repository ID for an IDL Java Type.
- * @param ser The IDL Value object to create a repository ID for
- * @param major The major version number
- * @param minor The minor version number
- * @exception com.sun.corba.se.impl.io.TypeMismatchException if ser does not implement the
- * org.omg.CORBA.portable.IDLEntity interface which indicates it is an IDL Value type.
- **/
- public static String createForIDLType(Class ser, int major, int minor)
- throws com.sun.corba.se.impl.io.TypeMismatchException
- {
- synchronized (classIDLToRepStr){
- String repid = (String)classIDLToRepStr.get(ser);
- if (repid != null)
- return repid;
-
- repid = kIDLPrefix + convertToISOLatin1(ser.getName()).replace('.','/') +
- ":" + major + "." + minor;
- classIDLToRepStr.put(ser, repid);
- return repid;
- }
- }
-
- private static String getIdFromHelper(Class clazz){
- try {
- Class helperClazz = Utility.loadClassForClass(clazz.getName()+"Helper", null,
- clazz.getClassLoader(), clazz, clazz.getClassLoader());
- Method idMethod = helperClazz.getDeclaredMethod("id", kNoParamTypes);
- return (String)idMethod.invoke(null, kNoArgs);
- }
- catch(java.lang.ClassNotFoundException cnfe)
- {
- throw new org.omg.CORBA.MARSHAL(cnfe.toString());
- }
- catch(java.lang.NoSuchMethodException nsme)
- {
- throw new org.omg.CORBA.MARSHAL(nsme.toString());
- }
- catch(java.lang.reflect.InvocationTargetException ite)
- {
- throw new org.omg.CORBA.MARSHAL(ite.toString());
- }
- catch(java.lang.IllegalAccessException iae)
- {
- throw new org.omg.CORBA.MARSHAL(iae.toString());
- }
- }
-
- /**
- * Createa a repository ID for the type if it is either a java type
- * or an IDL type.
- * @param type The type to create rep. id for
- * @return The rep. id.
- **/
- public static String createForAnyType(Class type) {
- try{
- if (type.isArray())
- return createSequenceRepID(type);
- else if (IDLEntity.class.isAssignableFrom(type))
- {
- try{
- return getIdFromHelper(type);
- }
- catch(Throwable t) {
- return createForIDLType(type, 1, 0);
- }
- }
- else return createForJavaType(type);
- }
- catch(com.sun.corba.se.impl.io.TypeMismatchException e){
- return null;
- }
-
- }
-
- public static boolean isAbstractBase(Class clazz) {
- return (clazz.isInterface() &&
- IDLEntity.class.isAssignableFrom(clazz) &&
- (!ValueBase.class.isAssignableFrom(clazz)) &&
- (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));
-
- }
-
- /**
- * Convert strings with illegal IDL identifier characters.
- * <p>
- * Section 5.5.7 of OBV spec.
- */
- private static String convertToISOLatin1 (String name) {
-
- int length = name.length();
- if (length == 0) {
- return name;
- }
- StringBuffer buffer = null;
-
- for (int i = 0; i < length; i++) {
-
- char c = name.charAt(i);
-
- if (c > 255 || IDL_IDENTIFIER_CHARS[c] == 0) {
-
- // We gotta convert. Have we already started?
-
- if (buffer == null) {
-
- // No, so get set up...
-
- buffer = new StringBuffer(name.substring(0,i));
- }
-
- // Convert the character into the IDL escape syntax...
- buffer.append(
- "\\U" +
- (char)ASCII_HEX[(c & 0xF000) >>> 12] +
- (char)ASCII_HEX[(c & 0x0F00) >>> 8] +
- (char)ASCII_HEX[(c & 0x00F0) >>> 4] +
- (char)ASCII_HEX[(c & 0x000F)]);
-
- } else {
- if (buffer != null) {
- buffer.append(c);
- }
- }
- }
-
- if (buffer != null) {
- name = buffer.toString();
- }
-
- return name;
- }
-
- /**
- * Convert strings with ISO Latin 1 escape sequences back to original strings.
- * <p>
- * Section 5.5.7 of OBV spec.
- */
- private static String convertFromISOLatin1 (String name) {
-
- int index = -1;
- StringBuffer buf = new StringBuffer(name);
-
- while ((index = buf.toString().indexOf("\\U")) != -1){
- String str = "0000" + buf.toString().substring(index+2, index+6);
-
- // Convert Hexadecimal
- byte[] buffer = new byte[(str.length() - 4) / 2];
- for (int i=4, j=0; i < str.length(); i +=2, j++) {
- buffer[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << 4) & 0xF0);
- buffer[j] |= (byte)((ORBUtility.hexOf(str.charAt(i+1)) << 0) & 0x0F);
- }
- buf = new StringBuffer(delete(buf.toString(), index, index+6));
- buf.insert(index, (char)buffer[1]);
- }
-
- return buf.toString();
-
-
- }
-
- private static String delete(String str, int from, int to)
- {
- return str.substring(0, from) + str.substring(to, str.length());
- }
-
- private static String replace(String target, String arg, String source)
- {
- int i = 0;
- i = target.indexOf(arg);
-
- while(i != -1)
- {
- String left = target.substring(0, i);
- String right = target.substring(i+arg.length());
- target = new String(left+source+right);
- i = target.indexOf(arg);
- }
- return target;
- }
-
- /*
- * Load a class and check that it is assignable to a given type.
- * @param className the class name.
- * @param remoteCodebase the codebase to use. May be null.
- * @param loader the class loader of last resort. May be null.
- * @param expectedType the expected type. May be null.
- * @return the loaded class.
- */
- private Class loadClassOfType (String className,
- String remoteCodebase,
- ClassLoader loader,
- Class expectedType,
- ClassLoader expectedTypeClassLoader)
- throws ClassNotFoundException {
-
- Class loadedClass = null;
-
- try {
- //Sequence finding of the stubs according to spec
- try{
- //If-else is put here for speed up of J2EE.
- //According to the OMG spec, the if clause is not dead code.
- //It can occur if some compiler has allowed generation
- //into org.omg.stub hierarchy for non-offending
- //classes. This will encourage people to
- //produce non-offending class stubs in their own hierarchy.
- if(!PackagePrefixChecker
- .hasOffendingPrefix(PackagePrefixChecker
- .withoutPackagePrefix(className))){
- loadedClass = Util.loadClass
- (PackagePrefixChecker.withoutPackagePrefix(className),
- remoteCodebase,
- loader);
- } else {
- loadedClass = Util.loadClass
- (className,
- remoteCodebase,
- loader);
- }
- } catch (ClassNotFoundException cnfe) {
- loadedClass = Util.loadClass
- (className,
- remoteCodebase,
- loader);
- }
- if (expectedType == null)
- return loadedClass;
- } catch (ClassNotFoundException cnfe) {
- if (expectedType == null)
- throw cnfe;
- }
-
- // If no class was not loaded, or if the loaded class is not of the
- // correct type, make a further attempt to load the correct class
- // using the classloader of the expected type.
- // _REVISIT_ Is this step necessary, or should the Util,loadClass
- // algorithm always produce a valid class if the setup is correct?
- // Does the OMG standard algorithm need to be changed to include
- // this step?
- if (loadedClass == null || !expectedType.isAssignableFrom(loadedClass)) {
- if (expectedType.getClassLoader() != expectedTypeClassLoader)
- throw new IllegalArgumentException("expectedTypeClassLoader not class loader of expectedType.");
-
- if (expectedTypeClassLoader != null)
- loadedClass = expectedTypeClassLoader.loadClass(className);
- else
- loadedClass = ORBClassLoader.loadClass(className);
- }
-
- return loadedClass;
- }
-
- /**
- * Checks to see if the FullValueDescription should be retrieved.
- * @exception Throws IOException if suids do not match or if the repositoryID
- * is not an RMIValueType
- */
- public static boolean useFullValueDescription(Class clazz, String repositoryID)
- throws IOException{
-
- String clazzRepIDStr = createForAnyType(clazz);
-
- if (clazzRepIDStr.equals(repositoryID))
- return false;
-
- RepositoryId_1_3 targetRepid;
- RepositoryId_1_3 clazzRepid;
-
- synchronized(cache) {
- // to avoid race condition where multiple threads could be
- // accessing this method, and their access to the cache may
- // be interleaved giving unexpected results
-
- targetRepid = cache.getId(repositoryID);
- clazzRepid = cache.getId(clazzRepIDStr);
- }
-
- if ((targetRepid.isRMIValueType()) && (clazzRepid.isRMIValueType())){
- if (!targetRepid.getSerialVersionUID().equals(clazzRepid.getSerialVersionUID())) {
-
- String mssg = "Mismatched serialization UIDs : Source (Rep. ID" +
- clazzRepid + ") = " +
- clazzRepid.getSerialVersionUID() + " whereas Target (Rep. ID " + repositoryID +
- ") = " + targetRepid.getSerialVersionUID();
- throw new IOException(mssg);
- } else {
- return true;
- }
- } else {
-
- throw new IOException("The repository ID is not of an RMI value type (Expected ID = " + clazzRepIDStr + "; Received ID = " + repositoryID +")");
- }
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java b/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java
deleted file mode 100644
index 8c1ab6e..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java
+++ /dev/null
@@ -1,1065 +0,0 @@
-/*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- */
-package com.sun.corba.se.impl.orbutil;
-
-import java.util.StringTokenizer;
-import java.util.Hashtable;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import org.omg.CORBA.portable.ValueBase;
-import org.omg.CORBA.portable.IDLEntity;
-
-//d11638 files in the same package, therefore remove their reference
-//import com.sun.corba.se.impl.util.JDKBridge;
-//import com.sun.corba.se.impl.util.IdentityHashtable;
-import com.sun.corba.se.impl.util.JDKBridge;
-import com.sun.corba.se.impl.util.Utility;
-import com.sun.corba.se.impl.util.PackagePrefixChecker;
-import com.sun.corba.se.impl.util.IdentityHashtable;
-
-import javax.rmi.CORBA.Util;
-
-/**
- * Because all methods in RepositoryId are static, we have
- * to duplicate all of this code, freezing it in its 1.3.1
- * form for backwards compatibility.
- *
- * For security reasons, we can't expose enough of
- * io/ObjectStreamClass, so it has to be duplicated in
- * orbutil.
- */
-public class RepositoryId_1_3_1 {
-
- // Legal IDL Identifier characters (1 = legal). Note
- // that '.' (2E) is marked as legal even though it is
- // not legal in IDL. This allows us to treat a fully
- // qualified Java name with '.' package separators
- // uniformly, and is safe because that is the only
- // legal use of '.' in a Java name.
-
- private static final byte[] IDL_IDENTIFIER_CHARS = {
-
- // 0 1 2 3 4 5 6 7 8 9 a b c d e f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 00-0f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 10-1f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,1,0, // 20-2f
- 1,1,1,1, 1,1,1,1, 1,1,0,0, 0,0,0,0, // 30-3f
- 0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 40-4f
- 1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,1, // 50-5f
- 0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 60-6f
- 1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,0, // 70-7f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 80-8f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 90-9f
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // a0-af
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // b0-bf
- 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // c0-cf
- 0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // d0-df
- 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // e0-ef
- 0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // f0-ff
- };
-
-
- private static final long serialVersionUID = 123456789L;
-
- private static String defaultServerURL = null;
- private static boolean useCodebaseOnly = false;
-
- static {
- if (defaultServerURL == null)
- defaultServerURL = (String)JDKBridge.getLocalCodebase();
- useCodebaseOnly = JDKBridge.useCodebaseOnly();
-
- }
-
- private static IdentityHashtable classToRepStr = new IdentityHashtable();
- private static IdentityHashtable classIDLToRepStr = new IdentityHashtable();
- private static IdentityHashtable classSeqToRepStr = new IdentityHashtable();
-
- private static IdentityHashtable repStrToByteArray = new IdentityHashtable();
- private static Hashtable repStrToClass = new Hashtable();
-
- private String repId = null;
- private boolean isSupportedFormat = true;
- private String typeString = null;
- private String versionString = null;
- private boolean isSequence = false;
- private boolean isRMIValueType = false;
- private boolean isIDLType = false;
- private String completeClassName = null;
- private String unqualifiedName = null;
- private String definedInId = null;
- private Class clazz = null;
- private String suid = null, actualSuid = null;
- private long suidLong = ObjectStreamClass_1_3_1.kDefaultUID, actualSuidLong = ObjectStreamClass_1_3_1.kDefaultUID;
-
- // Repository ID fragments
- private static final String kSequenceKeyword = "seq";
- private static final String kValuePrefix = "RMI:";
- private static final String kIDLPrefix = "IDL:";
- private static final String kIDLNamePrefix = "omg.org/";
- private static final String kIDLClassnamePrefix = "org.omg.";
- private static final String kSequencePrefix = "[";
- private static final String kCORBAPrefix = "CORBA/";
- private static final String kArrayPrefix = kValuePrefix + kSequencePrefix + kCORBAPrefix;
- private static final int kValuePrefixLength = kValuePrefix.length();
- private static final int kIDLPrefixLength = kIDLPrefix.length();
- private static final int kSequencePrefixLength = kSequencePrefix.length();
- private static final String kInterfaceHashCode = ":0000000000000000";
- private static final String kInterfaceOnlyHashStr = "0000000000000000";
- private static final String kExternalizableHashStr = "0000000000000001";
-
- // Value tag utility methods and constants
- public static final int kInitialValueTag= 0x7fffff00;
- public static final int kNoTypeInfo = 0;
- public static final int kSingleRepTypeInfo = 0x02;
- public static final int kPartialListTypeInfo = 0x06;
- public static final int kChunkedMask = 0x08;
- public static final int kPreComputed_StandardRMIUnchunked = RepositoryId_1_3_1.computeValueTag(false, RepositoryId_1_3_1.kSingleRepTypeInfo, false);
- public static final int kPreComputed_CodeBaseRMIUnchunked = RepositoryId_1_3_1.computeValueTag(true, RepositoryId_1_3_1.kSingleRepTypeInfo, false);
- public static final int kPreComputed_StandardRMIChunked = RepositoryId_1_3_1.computeValueTag(false, RepositoryId_1_3_1.kSingleRepTypeInfo, true);
- public static final int kPreComputed_CodeBaseRMIChunked = RepositoryId_1_3_1.computeValueTag(true, RepositoryId_1_3_1.kSingleRepTypeInfo, true);
-
- public static final int kPreComputed_StandardRMIUnchunked_NoRep = RepositoryId_1_3_1.computeValueTag(false, RepositoryId_1_3_1.kNoTypeInfo, false);
- public static final int kPreComputed_CodeBaseRMIUnchunked_NoRep = RepositoryId_1_3_1.computeValueTag(true, RepositoryId_1_3_1.kNoTypeInfo, false);
- public static final int kPreComputed_StandardRMIChunked_NoRep = RepositoryId_1_3_1.computeValueTag(false, RepositoryId_1_3_1.kNoTypeInfo, true);
- public static final int kPreComputed_CodeBaseRMIChunked_NoRep = RepositoryId_1_3_1.computeValueTag(true, RepositoryId_1_3_1.kNoTypeInfo, true);
-
- // Public, well known repository IDs
-
- // _REVISIT_ : A table structure with a good search routine for all of this
- // would be more efficient and easier to maintain...
-
- // String
- public static final String kWStringValueVersion = "1.0";
- public static final String kWStringValueHash = ":"+kWStringValueVersion;
- public static final String kWStringStubValue = "WStringValue";
- public static final String kWStringTypeStr = "omg.org/CORBA/"+kWStringStubValue;
- public static final String kWStringValueRepID = kIDLPrefix + kWStringTypeStr + kWStringValueHash;
-
- // Any
- public static final String kAnyRepID = kIDLPrefix + "omg.org/CORBA/Any";
-
- // Class
- // Anita4: convert to uppercase
- public static final String kClassDescValueHash = ":" +
- Long.toHexString(
- ObjectStreamClass_1_3_1.getActualSerialVersionUID(javax.rmi.CORBA.ClassDesc.class)).toUpperCase() + ":" +
- Long.toHexString(
- ObjectStreamClass_1_3_1.getSerialVersionUID(javax.rmi.CORBA.ClassDesc.class)).toUpperCase();
- public static final String kClassDescStubValue = "ClassDesc";
- public static final String kClassDescTypeStr = "javax.rmi.CORBA."+kClassDescStubValue;
- public static final String kClassDescValueRepID = kValuePrefix + kClassDescTypeStr + kClassDescValueHash;
-
- // Object
- public static final String kObjectValueHash = ":1.0";
- public static final String kObjectStubValue = "Object";
-
- // Sequence
- public static final String kSequenceValueHash = ":1.0";
- public static final String kPrimitiveSequenceValueHash = ":0000000000000000";
-
- // Serializable
- public static final String kSerializableValueHash = ":1.0";
- public static final String kSerializableStubValue = "Serializable";
-
- // Externalizable
- public static final String kExternalizableValueHash = ":1.0";
- public static final String kExternalizableStubValue = "Externalizable";
-
- // Remote (The empty string is used for java.rmi.Remote)
- public static final String kRemoteValueHash = "";
- public static final String kRemoteStubValue = "";
- public static final String kRemoteTypeStr = "";
- public static final String kRemoteValueRepID = "";
-
- private static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
-
- static {
- kSpecialArrayTypeStrings.put("CORBA.WStringValue", new StringBuffer(java.lang.String.class.getName()));
- kSpecialArrayTypeStrings.put("javax.rmi.CORBA.ClassDesc", new StringBuffer(java.lang.Class.class.getName()));
- kSpecialArrayTypeStrings.put("CORBA.Object", new StringBuffer(java.rmi.Remote.class.getName()));
-
- }
-
- private static final Hashtable kSpecialCasesRepIDs = new Hashtable();
-
- static {
- kSpecialCasesRepIDs.put(java.lang.String.class, kWStringValueRepID);
- kSpecialCasesRepIDs.put(java.lang.Class.class, kClassDescValueRepID);
- kSpecialCasesRepIDs.put(java.rmi.Remote.class, kRemoteValueRepID);
- }
-
- private static final Hashtable kSpecialCasesStubValues = new Hashtable();
-
- static {
- kSpecialCasesStubValues.put(java.lang.String.class, kWStringStubValue);
- kSpecialCasesStubValues.put(java.lang.Class.class, kClassDescStubValue);
- kSpecialCasesStubValues.put(java.lang.Object.class, kObjectStubValue);
- kSpecialCasesStubValues.put(java.io.Serializable.class, kSerializableStubValue);
- kSpecialCasesStubValues.put(java.io.Externalizable.class, kExternalizableStubValue);
- kSpecialCasesStubValues.put(java.rmi.Remote.class, kRemoteStubValue);
- }
-
-
- private static final Hashtable kSpecialCasesVersions = new Hashtable();
-
- static {
- kSpecialCasesVersions.put(java.lang.String.class, kWStringValueHash);
- kSpecialCasesVersions.put(java.lang.Class.class, kClassDescValueHash);
- kSpecialCasesVersions.put(java.lang.Object.class, kObjectValueHash);
- kSpecialCasesVersions.put(java.io.Serializable.class, kSerializableValueHash);
- kSpecialCasesVersions.put(java.io.Externalizable.class, kExternalizableValueHash);
- kSpecialCasesVersions.put(java.rmi.Remote.class, kRemoteValueHash);
- }
-
- private static final Hashtable kSpecialCasesClasses = new Hashtable();
-
- static {
- kSpecialCasesClasses.put(kWStringTypeStr, java.lang.String.class);
- kSpecialCasesClasses.put(kClassDescTypeStr, java.lang.Class.class);
- kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
-
- kSpecialCasesClasses.put("org.omg.CORBA.WStringValue", java.lang.String.class);
- kSpecialCasesClasses.put("javax.rmi.CORBA.ClassDesc", java.lang.Class.class);
- //kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
- }
-
- private static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
-
- static {
- kSpecialCasesArrayPrefix.put(java.lang.String.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
- kSpecialCasesArrayPrefix.put(java.lang.Class.class, kValuePrefix + kSequencePrefix + "javax/rmi/CORBA/");
- kSpecialCasesArrayPrefix.put(java.lang.Object.class, kValuePrefix + kSequencePrefix + "java/lang/");
- kSpecialCasesArrayPrefix.put(java.io.Serializable.class, kValuePrefix + kSequencePrefix + "java/io/");
- kSpecialCasesArrayPrefix.put(java.io.Externalizable.class, kValuePrefix + kSequencePrefix + "java/io/");
- kSpecialCasesArrayPrefix.put(java.rmi.Remote.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
- }
-
- private static final Hashtable kSpecialPrimitives = new Hashtable();
-
- static {
- kSpecialPrimitives.put("int","long");
- kSpecialPrimitives.put("long","longlong");
- kSpecialPrimitives.put("byte","octet");
- }
-
- /**
- * Used to convert ascii to hex.
- */
- private static final byte ASCII_HEX[] = {
- (byte)'0',
- (byte)'1',
- (byte)'2',
- (byte)'3',
- (byte)'4',
- (byte)'5',
- (byte)'6',
- (byte)'7',
- (byte)'8',
- (byte)'9',
- (byte)'A',
- (byte)'B',
- (byte)'C',
- (byte)'D',
- (byte)'E',
- (byte)'F',
- };
-
-
- // bug fix for 4328952; to eliminate possibility of overriding this
- // in a subclass.
- public static final RepositoryIdCache_1_3_1 cache = new RepositoryIdCache_1_3_1();
-
- // Interface Rep ID Strings
- public static final String kjava_rmi_Remote = createForAnyType(java.rmi.Remote.class);
- public static final String korg_omg_CORBA_Object = createForAnyType(org.omg.CORBA.Object.class);
-
- // Dummy arguments for getIdFromHelper method
- public static final Class kNoParamTypes[] ={};
- public static final Object kNoArgs[] = {};
-
-
- // To create a RepositoryID, use code similar to the following:
- // RepositoryId.cache.getId( id );
-
- RepositoryId_1_3_1(){}
-
- RepositoryId_1_3_1(String aRepId){
- init(aRepId);
- }
-
- RepositoryId_1_3_1 init(String aRepId){
-
- this.repId = aRepId;
-
- // Special case for remote
- if (aRepId.length() == 0) {
- clazz = java.rmi.Remote.class;
- typeString = "";
- isRMIValueType = true;
- suid = kInterfaceOnlyHashStr;
- return this;
- }
- else if (aRepId.equals(kWStringValueRepID)) {
- clazz = java.lang.String.class;
- typeString = kWStringTypeStr;
- isIDLType = true;
- // fix where Attempting to obtain a FullValueDescription
- // for an RMI value type with a String field causes an exception.
- completeClassName = "java.lang.String";
- versionString = kWStringValueVersion;
- return this;
- }
- else {
-
- String repId = convertFromISOLatin1(aRepId);
-
- versionString = repId.substring(repId.indexOf(':', repId.indexOf(':')+1));
- if (repId.startsWith(kIDLPrefix)) {
- typeString =
- repId.substring(kIDLPrefixLength, repId.indexOf(':', kIDLPrefixLength));
- isIDLType = true;
- if (typeString.startsWith(kIDLNamePrefix))
- completeClassName = kIDLClassnamePrefix +
- typeString.substring(kIDLNamePrefix.length()).replace('/','.');
- else completeClassName = typeString.replace('/','.');
-
- }
- else if (repId.startsWith(kValuePrefix)) {
- typeString =
- repId.substring(kValuePrefixLength, repId.indexOf(':', kValuePrefixLength));
- isRMIValueType = true;
-
- if (versionString.indexOf('.') == -1) {
- actualSuid = versionString.substring(1);
- suid = actualSuid; // default if not explicitly specified
-
- if (actualSuid.indexOf(':') != -1){
- // we have a declared hash also
- int pos = actualSuid.indexOf(':')+1;
- // actualSuid = suid.substring(pos);
- // suid = suid.substring(0, pos-1);
- suid = actualSuid.substring(pos);
- actualSuid = actualSuid.substring(0, pos-1);
- }
-
- }
- else {
- // _REVISIT_ : Special case version failure ?
- }
- }
- else isSupportedFormat = false;
-
- if (typeString.startsWith(kSequencePrefix)) {
- isSequence = true;
- }
-
-
- return this;
- }
- }
-
- public final String getUnqualifiedName() {
- if (unqualifiedName == null){
- String className = getClassName();
- int index = className.lastIndexOf('.');
- if (index == -1){
- unqualifiedName = className;
- definedInId = "IDL::1.0";
- }
- else {
- unqualifiedName = className.substring(index);
- definedInId = "IDL:" + className.substring(0, index).replace('.','/') + ":1.0";
- }
- }
-
- return unqualifiedName;
- }
-
- public final String getDefinedInId() {
- if (definedInId == null){
- getUnqualifiedName();
- }
-
- return definedInId;
- }
-
- public final String getTypeString() {
- return typeString;
- }
-
- public final String getVersionString() {
- return versionString;
- }
-
- public final String getSerialVersionUID() {
- return suid;
- }
-
- public final String getActualSerialVersionUID() {
- return actualSuid;
- }
- public final long getSerialVersionUIDAsLong() {
- return suidLong;
- }
-
- public final long getActualSerialVersionUIDAsLong() {
- return actualSuidLong;
- }
-
- public final boolean isRMIValueType() {
- return isRMIValueType;
- }
-
- public final boolean isIDLType() {
- return isIDLType;
- }
-
- public final String getRepositoryId() {
- return repId;
- }
-
- public static byte[] getByteArray(String repStr) {
- synchronized (repStrToByteArray){
- return (byte[]) repStrToByteArray.get(repStr);
- }
- }
-
- public static void setByteArray(String repStr, byte[] repStrBytes) {
- synchronized (repStrToByteArray){
- repStrToByteArray.put(repStr, repStrBytes);
- }
- }
-
- public final boolean isSequence() {
- return isSequence;
- }
-
- public final boolean isSupportedFormat() {
- return isSupportedFormat;
- }
-
-
- // This method will return the classname from the typestring OR if the classname turns out to be
- // a special class "pseudo" name, then the matching real classname is returned.
- public final String getClassName() {
-
- if (isRMIValueType)
- return typeString;
- else if (isIDLType)
- return completeClassName;
- else return null;
-
- }
-
- // This method calls getClazzFromType() and falls back to the repStrToClass
- // cache if no class was found. It's used where any class matching the
- // given repid is an acceptable result.
- public final Class getAnyClassFromType() throws ClassNotFoundException {
- try {
- return getClassFromType();
- } catch (ClassNotFoundException cnfe) {
- Class clz = (Class)repStrToClass.get(repId);
- if (clz != null)
- return clz;
- else
- throw cnfe;
- }
- }
-
- public final Class getClassFromType()
- throws ClassNotFoundException {
- if (clazz != null)
- return clazz;
-
- Class specialCase = (Class)kSpecialCasesClasses.get(getClassName());
-
- if (specialCase != null){
- clazz = specialCase;
- return specialCase;
- }
- else
- {
- try{
- return Util.loadClass(getClassName(), null, null);
- }
- catch(ClassNotFoundException cnfe){
- if (defaultServerURL != null) {
- try{
- return getClassFromType(defaultServerURL);
- }
- catch(MalformedURLException mue){
- throw cnfe;
- }
- }
- else throw cnfe;
- }
- }
-
- }
-
- public final Class getClassFromType(Class expectedType, String codebase)
- throws ClassNotFoundException {
- if (clazz != null)
- return clazz;
-
- Class specialCase = (Class)kSpecialCasesClasses.get(getClassName());
-
- if (specialCase != null){
- clazz = specialCase;
- return specialCase;
- } else {
- ClassLoader expectedTypeClassLoader = (expectedType == null ? null : expectedType.getClassLoader());
- return loadClassOfType(getClassName(),
- codebase,
- expectedTypeClassLoader,
- expectedType,
- expectedTypeClassLoader);
- }
-
- }
-
- public final Class getClassFromType(String url)
- throws ClassNotFoundException, MalformedURLException {
- return Util.loadClass(getClassName(), url, null);
- }
-
- public final String toString() {
- return repId;
- }
-
- /**
- * Checks to see if the FullValueDescription should be retrieved.
- * @exception Throws IOException if suids do not match or if the repositoryID
- * is not an RMIValueType
- */
- public static boolean useFullValueDescription(Class clazz, String repositoryID)
- throws IOException{
-
- String clazzRepIDStr = createForAnyType(clazz);
-
- if (clazzRepIDStr.equals(repositoryID))
- return false;
-
- RepositoryId_1_3_1 targetRepid;
- RepositoryId_1_3_1 clazzRepid;
-
- synchronized(cache) {
- // to avoid race condition where multiple threads could be
- // accessing this method, and their access to the cache may
- // be interleaved giving unexpected results
-
- targetRepid = cache.getId(repositoryID);
- clazzRepid = cache.getId(clazzRepIDStr);
- }
- //ObjectStreamClass osc = ObjectStreamClass.lookup(clazz);
-
- if ((targetRepid.isRMIValueType()) && (clazzRepid.isRMIValueType())){
- if (!targetRepid.getSerialVersionUID().equals(clazzRepid.getSerialVersionUID())) {
-
- String mssg = "Mismatched serialization UIDs : Source (Rep. ID" +
- clazzRepid + ") = " +
- clazzRepid.getSerialVersionUID() + " whereas Target (Rep. ID " + repositoryID +
- ") = " + targetRepid.getSerialVersionUID();
- //com.sun.corba.se.impl.io.ValueUtility.log("RepositoryId",mssg);
- throw new IOException(mssg);
- }
- else {
- return true;
- }
- }
- else {
-
- throw new IOException("The repository ID is not of an RMI value type (Expected ID = " + clazzRepIDStr + "; Received ID = " + repositoryID +")");
- }
- }
-
- private static String createHashString(java.io.Serializable ser) {
-
- return createHashString(ser.getClass());
- }
-
- private static String createHashString(java.lang.Class clazz) {
-
- if (clazz.isInterface() || !java.io.Serializable.class.isAssignableFrom(clazz))
- return kInterfaceHashCode;
-
- //ObjectStreamClass osc = ObjectStreamClass.lookup(clazz);
-
- long actualLong = ObjectStreamClass_1_3_1.getActualSerialVersionUID(clazz);
- String hash = null;
- if (actualLong == 0)
- hash = kInterfaceOnlyHashStr;
- else if (actualLong == 1)
- hash = kExternalizableHashStr;
- else
- hash = Long.toHexString(actualLong).toUpperCase();
- while(hash.length() < 16){
- hash = "0" + hash;
- }
-
- long declaredLong = ObjectStreamClass_1_3_1.getSerialVersionUID(clazz);
- String declared = null;
- if (declaredLong == 0)
- declared = kInterfaceOnlyHashStr;
- else if (declaredLong == 1)
- declared = kExternalizableHashStr;
- else
- declared = Long.toHexString(declaredLong).toUpperCase();
- while (declared.length() < 16){
- declared = "0" + declared;
- }
- hash = hash + ":" + declared;
-
- return ":" + hash;
- }
-
- /**
- * Creates a repository ID for a sequence. This is for expert users only as
- * this method assumes the object passed is an array. If passed an object
- * that is not an array, it will produce a rep id for a sequence of zero
- * length. This would be an error.
- * @param ser The Java object to create a repository ID for
- **/
- public static String createSequenceRepID(java.lang.Object ser){
- return createSequenceRepID(ser.getClass());
- }
-
- /**
- * Creates a repository ID for a sequence. This is for expert users only as
- * this method assumes the object passed is an array. If passed an object
- * that is not an array, it will produce a malformed rep id.
- * @param clazz The Java class to create a repository ID for
- **/
- public static String createSequenceRepID(java.lang.Class clazz){
- synchronized (classSeqToRepStr){
-
- String repid = (String)classSeqToRepStr.get(clazz);
- if (repid != null)
- return repid;
-
- Class originalClazz = clazz;
-
- Class type = null;
- int numOfDims = 0;
-
- while ((type = clazz.getComponentType()) != null) {
- numOfDims++;
- clazz = type;
- }
-
- if (clazz.isPrimitive())
- repid = kValuePrefix + originalClazz.getName() + kPrimitiveSequenceValueHash;
- else {
- StringBuffer buf = new StringBuffer();
- buf.append(kValuePrefix);
- while(numOfDims-- > 0) {
- buf.append("[");
- }
- buf.append("L");
- buf.append(convertToISOLatin1(clazz.getName()));
- buf.append(";");
- buf.append(createHashString(clazz));
- repid = buf.toString();
- }
- classSeqToRepStr.put(originalClazz,repid);
- return repid;
- }
-
- }
-
-
- public static String createForSpecialCase(java.lang.Class clazz){
- if (clazz.isArray()){
- return createSequenceRepID(clazz);
- }
- else {
- return (String)kSpecialCasesRepIDs.get(clazz);
- }
- }
-
- public static String createForSpecialCase(java.io.Serializable ser){
- Class clazz = ser.getClass();
- if (clazz.isArray()){
- return createSequenceRepID(ser);
- }
- else
- return createForSpecialCase(clazz);
- }
-
- /**
- * Creates a repository ID for a normal Java Type.
- * @param ser The Java object to create a repository ID for
- * @exception com.sun.corba.se.impl.io.TypeMismatchException if ser implements the
- * org.omg.CORBA.portable.IDLEntity interface which indicates it is an IDL Value type.
- **/
- public static String createForJavaType(java.io.Serializable ser)
- throws com.sun.corba.se.impl.io.TypeMismatchException
- {
- synchronized (classToRepStr) {
- String repid = createForSpecialCase(ser);
- if (repid != null)
- return repid;
- Class clazz = ser.getClass();
- repid = (String)classToRepStr.get(clazz);
-
- if (repid != null)
- return repid;
-
- repid = kValuePrefix + convertToISOLatin1(clazz.getName()) +
- createHashString(clazz);
-
- classToRepStr.put(clazz, repid);
- repStrToClass.put(repid, clazz);
- return repid;
- }
- }
-
- /**
- * Creates a repository ID for a normal Java Type.
- * @param clz The Java class to create a repository ID for
- * @exception com.sun.corba.se.impl.io.TypeMismatchException if ser implements the
- * org.omg.CORBA.portable.IDLEntity interface which indicates it is an IDL Value type.
- **/
- public static String createForJavaType(Class clz)
- throws com.sun.corba.se.impl.io.TypeMismatchException
- {
- synchronized (classToRepStr){
- String repid = createForSpecialCase(clz);
- if (repid != null)
- return repid;
-
- repid = (String)classToRepStr.get(clz);
- if (repid != null)
- return repid;
-
- repid = kValuePrefix + convertToISOLatin1(clz.getName()) +
- createHashString(clz);
-
- classToRepStr.put(clz, repid);
- repStrToClass.put(repid, clz);
- return repid;
- }
- }
-
- /**
- * Creates a repository ID for an IDL Java Type.
- * @param ser The IDL Value object to create a repository ID for
- * @param major The major version number
- * @param minor The minor version number
- * @exception com.sun.corba.se.impl.io.TypeMismatchException if ser does not implement the
- * org.omg.CORBA.portable.IDLEntity interface which indicates it is an IDL Value type.
- **/
- public static String createForIDLType(Class ser, int major, int minor)
- throws com.sun.corba.se.impl.io.TypeMismatchException
- {
- synchronized (classIDLToRepStr){
- String repid = (String)classIDLToRepStr.get(ser);
- if (repid != null)
- return repid;
-
- repid = kIDLPrefix + convertToISOLatin1(ser.getName()).replace('.','/') +
- ":" + major + "." + minor;
- classIDLToRepStr.put(ser, repid);
- return repid;
- }
- }
-
- private static String getIdFromHelper(Class clazz){
- try {
- Class helperClazz = Utility.loadClassForClass(clazz.getName()+"Helper", null,
- clazz.getClassLoader(), clazz, clazz.getClassLoader());
- Method idMethod = helperClazz.getDeclaredMethod("id", kNoParamTypes);
- return (String)idMethod.invoke(null, kNoArgs);
- }
- catch(java.lang.ClassNotFoundException cnfe)
- {
- throw new org.omg.CORBA.MARSHAL(cnfe.toString());
- }
- catch(java.lang.NoSuchMethodException nsme)
- {
- throw new org.omg.CORBA.MARSHAL(nsme.toString());
- }
- catch(java.lang.reflect.InvocationTargetException ite)
- {
- throw new org.omg.CORBA.MARSHAL(ite.toString());
- }
- catch(java.lang.IllegalAccessException iae)
- {
- throw new org.omg.CORBA.MARSHAL(iae.toString());
- }
- }
-
- /**
- * Createa a repository ID for the type if it is either a java type
- * or an IDL type.
- * @param type The type to create rep. id for
- * @return The rep. id.
- **/
- public static String createForAnyType(Class type) {
- try{
- if (type.isArray())
- return createSequenceRepID(type);
- else if (IDLEntity.class.isAssignableFrom(type))
- {
- try{
- return getIdFromHelper(type);
- }
- catch(Throwable t) {
- return createForIDLType(type, 1, 0);
- }
- }
- else return createForJavaType(type);
- }
- catch(com.sun.corba.se.impl.io.TypeMismatchException e){
- return null;
- }
-
- }
-
- public static boolean isAbstractBase(Class clazz) {
- return (clazz.isInterface() &&
- IDLEntity.class.isAssignableFrom(clazz) &&
- (!ValueBase.class.isAssignableFrom(clazz)) &&
- (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));
-
- }
-
- public static boolean isAnyRequired(Class clazz) {
- return ((clazz == java.lang.Object.class) ||
- (clazz == java.io.Serializable.class) ||
- (clazz == java.io.Externalizable.class));
- }
-
- public static long fromHex(String hexNumber) {
- if (hexNumber.startsWith("0x"))
- return Long.valueOf(hexNumber.substring(2), 16).longValue();
- else return Long.valueOf(hexNumber, 16).longValue();
- }
-
- /**
- * Convert strings with illegal IDL identifier characters.
- * <p>
- * Section 5.5.7 of OBV spec.
- */
- private static String convertToISOLatin1 (String name) {
-
- int length = name.length();
- if (length == 0) {
- return name;
- }
- StringBuffer buffer = null;
-
- for (int i = 0; i < length; i++) {
-
- char c = name.charAt(i);
-
- if (c > 255 || IDL_IDENTIFIER_CHARS[c] == 0) {
-
- // We gotta convert. Have we already started?
-
- if (buffer == null) {
-
- // No, so get set up...
-
- buffer = new StringBuffer(name.substring(0,i));
- }
-
- // Convert the character into the IDL escape syntax...
- buffer.append(
- "\\U" +
- (char)ASCII_HEX[(c & 0xF000) >>> 12] +
- (char)ASCII_HEX[(c & 0x0F00) >>> 8] +
- (char)ASCII_HEX[(c & 0x00F0) >>> 4] +
- (char)ASCII_HEX[(c & 0x000F)]);
-
- } else {
- if (buffer != null) {
- buffer.append(c);
- }
- }
- }
-
- if (buffer != null) {
- name = buffer.toString();
- }
-
- return name;
- }
-
- /**
- * Convert strings with ISO Latin 1 escape sequences back to original strings.
- * <p>
- * Section 5.5.7 of OBV spec.
- */
- private static String convertFromISOLatin1 (String name) {
-
- int index = -1;
- StringBuffer buf = new StringBuffer(name);
-
- while ((index = buf.toString().indexOf("\\U")) != -1){
- String str = "0000" + buf.toString().substring(index+2, index+6);
-
- // Convert Hexadecimal
- byte[] buffer = new byte[(str.length() - 4) / 2];
- for (int i=4, j=0; i < str.length(); i +=2, j++) {
- buffer[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << 4) & 0xF0);
- buffer[j] |= (byte)((ORBUtility.hexOf(str.charAt(i+1)) << 0) & 0x0F);
- }
- buf = new StringBuffer(delete(buf.toString(), index, index+6));
- buf.insert(index, (char)buffer[1]);
- }
-
- return buf.toString();
-
-
- }
-
- private static String delete(String str, int from, int to)
- {
- return str.substring(0, from) + str.substring(to, str.length());
- }
-
- private static String replace(String target, String arg, String source)
- {
- int i = 0;
- i = target.indexOf(arg);
-
- while(i != -1)
- {
- String left = target.substring(0, i);
- String right = target.substring(i+arg.length());
- target = new String(left+source+right);
- i = target.indexOf(arg);
- }
- return target;
- }
-
- public static int computeValueTag(boolean codeBasePresent, int typeInfo, boolean chunkedEncoding){
- int value_tag = kInitialValueTag;
-
- if (codeBasePresent)
- value_tag = value_tag | 0x00000001;
-
- value_tag = value_tag | typeInfo;
-
- if (chunkedEncoding)
- value_tag = value_tag | kChunkedMask;
-
- return value_tag;
- }
-
- public static boolean isCodeBasePresent(int value_tag){
- return ((value_tag & 0x00000001) == 1);
- }
-
- public static int getTypeInfo(int value_tag){
- return (value_tag & 0x00000006);
- }
-
- public static boolean isChunkedEncoding(int value_tag){
- return ((value_tag & kChunkedMask) != 0);
- }
-
- public static String getServerURL(){
- return defaultServerURL;
- }
-
- /*
- * Load a class and check that it is assignable to a given type.
- * @param className the class name.
- * @param remoteCodebase the codebase to use. May be null.
- * @param loader the class loader of last resort. May be null.
- * @param expectedType the expected type. May be null.
- * @return the loaded class.
- */
- private Class loadClassOfType (String className,
- String remoteCodebase,
- ClassLoader loader,
- Class expectedType,
- ClassLoader expectedTypeClassLoader)
- throws ClassNotFoundException {
-
- Class loadedClass = null;
-
- try {
- //Sequence finding of the stubs according to spec
- try{
- //If-else is put here for speed up of J2EE.
- //According to the OMG spec, the if clause is not dead code.
- //It can occur if some compiler has allowed generation
- //into org.omg.stub hierarchy for non-offending
- //classes. This will encourage people to
- //produce non-offending class stubs in their own hierarchy.
- if(!PackagePrefixChecker
- .hasOffendingPrefix(PackagePrefixChecker
- .withoutPackagePrefix(className))){
- loadedClass = Util.loadClass
- (PackagePrefixChecker.withoutPackagePrefix(className),
- remoteCodebase,
- loader);
- } else {
- loadedClass = Util.loadClass
- (className,
- remoteCodebase,
- loader);
- }
- } catch (ClassNotFoundException cnfe) {
- loadedClass = Util.loadClass
- (className,
- remoteCodebase,
- loader);
- }
- if (expectedType == null)
- return loadedClass;
- } catch (ClassNotFoundException cnfe) {
- if (expectedType == null)
- throw cnfe;
- }
-
- // If no class was not loaded, or if the loaded class is not of the
- // correct type, make a further attempt to load the correct class
- // using the classloader of the expected type.
- // _REVISIT_ Is this step necessary, or should the Util,loadClass
- // algorithm always produce a valid class if the setup is correct?
- // Does the OMG standard algorithm need to be changed to include
- // this step?
- if (loadedClass == null || !expectedType.isAssignableFrom(loadedClass)) {
- if (expectedType.getClassLoader() != expectedTypeClassLoader)
- throw new IllegalArgumentException("expectedTypeClassLoader not class loader of expectedType.");
-
- if (expectedTypeClassLoader != null)
- loadedClass = expectedTypeClassLoader.loadClass(className);
- else
- loadedClass = Class.forName(className);
- }
-
- return loadedClass;
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3.java b/src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3.java
deleted file mode 100644
index 68b53c3..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Licensed Materials - Property of IBM
- * RMI-IIOP v1.0
- * Copyright IBM Corp. 1998 1999 All Rights Reserved
- *
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import javax.rmi.CORBA.Util;
-import javax.rmi.PortableRemoteObject;
-
-import java.util.Hashtable;
-import java.util.Stack;
-import java.io.IOException;
-import java.util.EmptyStackException;
-
-import com.sun.corba.se.impl.util.Utility;
-import com.sun.corba.se.impl.io.IIOPInputStream;
-import com.sun.corba.se.impl.io.IIOPOutputStream;
-import com.sun.corba.se.impl.util.RepositoryId;
-import com.sun.corba.se.impl.util.Utility;
-
-import org.omg.CORBA.TCKind;
-import org.omg.CORBA.MARSHAL;
-import org.omg.CORBA.CompletionStatus;
-import org.omg.CORBA.portable.IndirectionException;
-import com.sun.org.omg.SendingContext.CodeBase;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * This class overrides behavior of our current ValueHandlerImpl to
- * provide backwards compatibility with JDK 1.3.0.
- */
-public class ValueHandlerImpl_1_3 extends com.sun.corba.se.impl.io.ValueHandlerImpl {
-
- public ValueHandlerImpl_1_3(){
- super();
- }
-
- public ValueHandlerImpl_1_3(boolean isInputStream) {
- super(isInputStream);
- }
-
- /**
- * Writes the value to the stream using java semantics.
- * @param out The stream to write the value to
- * @param value The value to be written to the stream
- **/
- public void writeValue(org.omg.CORBA.portable.OutputStream _out, java.io.Serializable value) {
- super.writeValue(_out, value);
- }
-
- /**
- * Reads a value from the stream using java semantics.
- * @param in The stream to read the value from
- * @param clazz The type of the value to be read in
- * @param sender The sending context runtime
- **/
- public java.io.Serializable readValue(org.omg.CORBA.portable.InputStream _in,
- int offset,
- java.lang.Class clazz,
- String repositoryID,
- org.omg.SendingContext.RunTime _sender)
- {
- return super.readValue(_in, offset, clazz, repositoryID, _sender);
- }
-
- /**
- * Returns the repository ID for the given RMI value Class.
- * @param clz The class to return a repository ID for.
- * @return the repository ID of the Class.
- **/
- public java.lang.String getRMIRepositoryID(java.lang.Class clz) {
- return RepositoryId_1_3.createForJavaType(clz);
- }
-
- /**
- * Indicates whether the given Class performs custom or
- * default marshaling.
- * @param clz The class to test for custom marshaling.
- * @return True if the class performs custom marshaling, false
- * if it does not.
- **/
- public boolean isCustomMarshaled(java.lang.Class clz) {
- return super.isCustomMarshaled(clz);
- }
-
- /**
- * Returns the CodeBase for this ValueHandler. This is used by
- * the ORB runtime. The server sends the service context containing
- * the IOR for this CodeBase on the first GIOP reply. The clients
- * do the same on the first GIOP request.
- * @return the SendingContext.CodeBase of this ValueHandler.
- **/
- public org.omg.SendingContext.RunTime getRunTimeCodeBase() {
- return super.getRunTimeCodeBase();
- }
-
- /**
- * If the value contains a writeReplace method then the result
- * is returned. Otherwise, the value itself is returned.
- * @return the true value to marshal on the wire.
- **/
- public java.io.Serializable writeReplace(java.io.Serializable value) {
- return super.writeReplace(value);
- }
-
- // methods supported for backward compatability so that the appropriate
- // Rep-id calculations take place based on the ORB version
-
- /**
- * Returns a boolean of whether or not RepositoryId indicates
- * FullValueDescriptor.
- * used for backward compatability
- */
-
- public boolean useFullValueDescription(Class clazz, String repositoryID)
- throws IOException
-
- {
- return RepositoryId_1_3.useFullValueDescription(clazz, repositoryID);
- }
-
- public String getClassName(String id)
- {
- RepositoryId_1_3 repID = RepositoryId_1_3.cache.getId(id);
- return repID.getClassName();
- }
-
- public Class getClassFromType(String id)
- throws ClassNotFoundException
- {
- RepositoryId_1_3 repId = RepositoryId_1_3.cache.getId(id);
- return repId.getClassFromType();
- }
-
- public Class getAnyClassFromType(String id)
- throws ClassNotFoundException
- {
- RepositoryId_1_3 repId = RepositoryId_1_3.cache.getId(id);
- return repId.getAnyClassFromType();
- }
-
- public String createForAnyType(Class cl)
- {
- return RepositoryId_1_3.createForAnyType(cl);
- }
-
- public String getDefinedInId(String id)
- {
- RepositoryId_1_3 repId = RepositoryId_1_3.cache.getId(id);
- return repId.getDefinedInId();
- }
-
- public String getUnqualifiedName(String id)
- {
- RepositoryId_1_3 repId = RepositoryId_1_3.cache.getId(id);
- return repId.getUnqualifiedName();
- }
-
- public String getSerialVersionUID(String id)
- {
- RepositoryId_1_3 repId = RepositoryId_1_3.cache.getId(id);
- return repId.getSerialVersionUID();
- }
-
- public boolean isAbstractBase(Class clazz)
- {
- return RepositoryId_1_3.isAbstractBase(clazz);
- }
-
- public boolean isSequence(String id)
- {
- RepositoryId_1_3 repId = RepositoryId_1_3.cache.getId(id);
- return repId.isSequence();
- }
-
- /**
- * Preserves the incorrect 1.3 behavior which truncates Java chars in
- * arrays to 8-bit CORBA chars. Bug 4367783. This enables us to
- * continue interoperating with our legacy ORBs. If this goes into
- * Ladybird, then Ladybird and Kestrel will interoperate as long as
- * people don't use chars greater than 8-bits.
- */
- protected void writeCharArray(org.omg.CORBA_2_3.portable.OutputStream out,
- char[] array,
- int offset,
- int length)
- {
- out.write_char_array(array, offset, length);
- }
-
- /**
- * Preserves the incorrect 1.3 behavior which truncates Java chars in
- * arrays to 8-bit CORBA chars. Bug 4367783. This enables us to
- * continue interoperating with our legacy ORBs. If this goes into
- * Ladybird, then Ladybird and Kestrel will interoperate as long as
- * people don't use chars greater than 8-bits.
- */
- protected void readCharArray(org.omg.CORBA_2_3.portable.InputStream in,
- char[] array,
- int offset,
- int length)
- {
- in.read_char_array(array, offset, length);
- }
-
- protected final String getOutputStreamClassName() {
- return "com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3";
- }
-
- protected final String getInputStreamClassName() {
- return "com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3";
- }
-
- /**
- * Our JDK 1.3 and JDK 1.3.1 behavior subclasses override this.
- * The correct behavior is for a Java char to map to a CORBA wchar,
- * but our older code mapped it to a CORBA char.
- */
- protected TCKind getJavaCharTCKind() {
- return TCKind.tk_char;
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3_1.java b/src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3_1.java
deleted file mode 100644
index 7309ec1..0000000
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3_1.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.corba.se.impl.orbutil;
-
-import org.omg.CORBA.TCKind;
-
-/**
- * This class overrides behavior of our current ValueHandlerImpl to
- * provide backwards compatibility with JDK 1.3.1.
- */
-public class ValueHandlerImpl_1_3_1
- extends com.sun.corba.se.impl.io.ValueHandlerImpl
-{
- public ValueHandlerImpl_1_3_1() {}
-
- public ValueHandlerImpl_1_3_1(boolean isInputStream) {
- super(isInputStream);
- }
-
- /**
- * Our JDK 1.3 and JDK 1.3.1 behavior subclasses override this.
- * The correct behavior is for a Java char to map to a CORBA wchar,
- * but our older code mapped it to a CORBA char.
- */
- protected TCKind getJavaCharTCKind() {
- return TCKind.tk_char;
- }
-
- /**
- * RepositoryId_1_3_1 performs an incorrect repId calculation
- * when using serialPersistentFields and one of the fields no longer
- * exists on the class itself.
- */
- public boolean useFullValueDescription(Class clazz, String repositoryID)
- throws java.io.IOException
- {
- return RepositoryId_1_3_1.useFullValueDescription(clazz, repositoryID);
- }
-
- /**
- * Installs the legacy IIOPOutputStream_1_3_1 which does
- * PutFields/GetFields incorrectly. Bug 4407244.
- */
- protected final String getOutputStreamClassName() {
- return "com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1";
- }
-
- /**
- * Installs the legacy IIOPInputStream_1_3_1 which does
- * PutFields/GetFields incorrectly. Bug 4407244.
- */
- protected final String getInputStreamClassName() {
- return "com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1";
- }
-}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_de.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_de.properties
index 3343f1f..b33670e 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_de.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_de.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_es.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_es.properties
index 96707e4..1256289 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_es.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_es.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_fr.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_fr.properties
index b46f46c..b1b64f1 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_fr.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_fr.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_it.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_it.properties
index 7d39881..908f7a4 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_it.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_it.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,9 @@
# questions.
#
-orbd.usage=Utilizzo: {0} <opzioni> \n\ndove <opzioni> include:\n -port Porta di attivazione da cui avviare ORBD, valore predefinito 1049 (opzionale)\n -defaultdb Directory per i file ORBD, valore predefinito "./orb.db" (opzionale)\n -serverid ID server per ORBD, valore predefinito 1 (opzionale)\n -ORBInitialPort Porta iniziale (richiesta)\n -ORBInitialHost HostName iniziale (richiesto)\n
+orbd.usage=Uso: {0} <opzioni> \n\ndove <opzioni> include:\n -port Porta di attivazione da cui avviare ORBD, valore predefinito 1049 (opzionale)\n -defaultdb Directory per i file ORBD, valore predefinito "./orb.db" (opzionale)\n -serverid ID server per ORBD, valore predefinito 1 (opzionale)\n -ORBInitialPort Porta iniziale (richiesta)\n -ORBInitialHost HostName iniziale (richiesto)\n
-servertool.usage=Utilizzo: {0} <opzioni> \n\ndove <opzioni> include:\n -ORBInitialPort Porta iniziale (richiesta)\n -ORBInitialHost HostName iniziale (richiesto)\n
+servertool.usage=Uso: {0} <opzioni> \n\ndove <opzioni> include:\n -ORBInitialPort Porta iniziale (richiesta)\n -ORBInitialHost HostName iniziale (richiesto)\n
servertool.banner=\n\nBenvenuti in Java IDL Server Tool \nimmettere i comandi quando richiesto \n
servertool.shorthelp=\n\n\tComandi disponibili:\n\t-------------------- \n
servertool.baddef=Definizione server errata: {0}
@@ -82,13 +82,13 @@ servertool.quit1=esci dall'applicazione corrente
servertool.help=\thelp\n\tOR\n\thelp <nome comando>\n
servertool.help1=Guida
-servertool.orbidmap=\tUtilizzo: orblist [ -serverid <id server> | -applicationName <nome> ]\n
+servertool.orbidmap=\tUso: orblist [ -serverid <id server> | -applicationName <nome> ]\n
servertool.orbidmap1=lista nomi orb e relativa mappatura
servertool.orbidmap2=\n\tId ORB\t\tNome ORB\n\t------\t\t--------\n
pnameserv.success=NameServer persistente avviato correttamente
-bootstrap.usage=Utilizzo: {0} <opzioni> \n\ndove <opzioni> include:\n -ORBInitialPort Porta iniziale (richiesta)\n -InitialServicesFile File contenente la lista dei servizi iniziali (richiesto)\n
+bootstrap.usage=Uso: {0} <opzioni> \n\ndove <opzioni> include:\n -ORBInitialPort Porta iniziale (richiesta)\n -InitialServicesFile File contenente la lista dei servizi iniziali (richiesto)\n
bootstrap.success=impostazione porta su {0} e lettura servizi da {1} in corso
bootstrap.filenotreadable=il file {0} non \u00E8 leggibile
bootstrap.filenotfound=impossibile trovare il file {0}
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ja.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ja.properties
index 8911bd1..f067fd9 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ja.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ja.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -60,12 +60,12 @@ servertool.getserverid=\n\tgetserverid [ -applicationName <name> ]\n
servertool.getserverid1=applicationName\u306E\u30B5\u30FC\u30D0\u30FCID\u3092\u8FD4\u3057\u307E\u3059
servertool.getserverid2=\tapplicationName {0}\u306E\u30B5\u30FC\u30D0\u30FCID\u306F{1}\u3067\u3059
-servertool.list=\n\t\u30EA\u30B9\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\n
+servertool.list=\n\tlist\n
servertool.list1=\u767B\u9332\u3055\u308C\u305F\u3059\u3079\u3066\u306E\u30B5\u30FC\u30D0\u30FC\u306E\u30EA\u30B9\u30C8\u3092\u8868\u793A\u3057\u307E\u3059
servertool.list2=\n\t\u30B5\u30FC\u30D0\u30FCID\t\u30B5\u30FC\u30D0\u30FC\u306E\u30AF\u30E9\u30B9\u540D\t\t\u30B5\u30FC\u30D0\u30FC\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\n\t---------\t----------------\t\t----------------------\n
-servertool.listactive=\n\t\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B5\u30FC\u30D0\u30FC\u306E\u30EA\u30B9\u30C8\u3092\u8868\u793A\u3057\u307E\u3059
+servertool.listactive=\n\tlistactive
servertool.listactive1=\u73FE\u5728\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30B5\u30FC\u30D0\u30FC\u306E\u30EA\u30B9\u30C8\u3092\u8868\u793A\u3057\u307E\u3059
-servertool.listappnames=\tapplicationNames\u306E\u30EA\u30B9\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\n
+servertool.listappnames=\tlistappnames\n
servertool.listappnames1=\u73FE\u5728\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308BapplicationNames\u306E\u30EA\u30B9\u30C8\u3092\u8868\u793A\u3057\u307E\u3059
servertool.listappnames2=\u73FE\u5728\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B\u30B5\u30FC\u30D0\u30FCapplicationNames:
@@ -76,7 +76,7 @@ servertool.startserver=\n\tstartup [ -serverid <server id> | -applicationName <n
servertool.startserver1=\u767B\u9332\u3055\u308C\u305F\u30B5\u30FC\u30D0\u30FC\u3092\u8D77\u52D5\u3057\u307E\u3059
servertool.startserver2=\t\u30B5\u30FC\u30D0\u30FC\u306E\u8D77\u52D5\u306B\u6210\u529F\u3057\u307E\u3057\u305F\u3002
-servertool.quit=\n\t\u7D42\u4E86\u3057\u307E\u3059\n
+servertool.quit=\n\tquit\n
servertool.quit1=\u3053\u306E\u30C4\u30FC\u30EB\u3092\u7D42\u4E86\u3057\u307E\u3059
servertool.help=\thelp\n\t\u307E\u305F\u306F\n\thelp <command name>\n
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ko.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ko.properties
index 7d58921..7be6158 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ko.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_ko.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_pt_BR.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_pt_BR.properties
index 1c5dbce..81ca99d 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_pt_BR.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_pt_BR.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_sv.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_sv.properties
index eaf5b45..c11488e 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_sv.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_sv.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_CN.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_CN.properties
index e03e66b..6dce9e6 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_CN.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_CN.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties
index 075fa02..db79752 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
diff --git a/src/share/classes/com/sun/corba/se/spi/orb/ORB.java b/src/share/classes/com/sun/corba/se/spi/orb/ORB.java
index 22b89e7..306a9f7 100644
--- a/src/share/classes/com/sun/corba/se/spi/orb/ORB.java
+++ b/src/share/classes/com/sun/corba/se/spi/orb/ORB.java
@@ -98,6 +98,7 @@ import com.sun.corba.se.impl.logging.OMGSystemException ;
import com.sun.corba.se.impl.presentation.rmi.PresentationManagerImpl ;
import com.sun.corba.se.impl.orbutil.ORBClassLoader ;
+import sun.awt.AppContext;
public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
implements Broker, TypeCodeFactory
@@ -173,14 +174,7 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
protected MonitoringManager monitoringManager;
- // There is only one instance of the PresentationManager
- // that is shared between all ORBs. This is necessary
- // because RMI-IIOP requires the PresentationManager in
- // places where no ORB is available, so the PresentationManager
- // must be global. It is initialized here as well.
- protected static PresentationManager globalPM = null ;
-
- static {
+ private static PresentationManager setupPresentationManager() {
staticWrapper = ORBUtilSystemException.get(
CORBALogDomains.RPC_PRESENTATION ) ;
@@ -220,10 +214,11 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
}
) ;
- globalPM = new PresentationManagerImpl( useDynamicStub ) ;
- globalPM.setStubFactoryFactory( false,
+ PresentationManager pm = new PresentationManagerImpl( useDynamicStub ) ;
+ pm.setStubFactoryFactory( false,
PresentationDefaults.getStaticStubFactoryFactory() ) ;
- globalPM.setStubFactoryFactory( true, dynamicStubFactoryFactory ) ;
+ pm.setStubFactoryFactory( true, dynamicStubFactoryFactory ) ;
+ return pm;
}
public void destroy() {
@@ -234,11 +229,19 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
byteBufferPool = null;
}
- /** Get the single instance of the PresentationManager
+ /**
+ * Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific
+ * AppContext to hold it. Creates and records one if needed.
*/
public static PresentationManager getPresentationManager()
{
- return globalPM ;
+ AppContext ac = AppContext.getAppContext();
+ PresentationManager pm = (PresentationManager) ac.get(PresentationManager.class);
+ if (pm == null) {
+ pm = setupPresentationManager();
+ ac.put(PresentationManager.class, pm);
+ }
+ return pm;
}
/** Get the appropriate StubFactoryFactory. This
@@ -248,8 +251,9 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
public static PresentationManager.StubFactoryFactory
getStubFactoryFactory()
{
- boolean useDynamicStubs = globalPM.useDynamicStubs() ;
- return globalPM.getStubFactoryFactory( useDynamicStubs ) ;
+ PresentationManager gPM = getPresentationManager();
+ boolean useDynamicStubs = gPM.useDynamicStubs() ;
+ return gPM.getStubFactoryFactory( useDynamicStubs ) ;
}
protected ORB()
diff --git a/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp b/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp
index ab409ba..80fbd04 100644
--- a/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp
+++ b/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp
@@ -68,7 +68,7 @@ Compile.parsing=%0\u306E\u89E3\u6790\u4E2D
Compile.parseDone=\u5B8C\u4E86 - %0
Compile.generating=%0\u306E\u751F\u6210\u4E2D
Compile.genDone=\u5B8C\u4E86 - %0
-Deprecated.keyword=\u8B66\u544A: \u30AD\u30FC\u30EF\u30FC\u30C9`%0'\u306F\u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+Deprecated.keyword=\u8B66\u544A: \u30AD\u30FC\u30EF\u30FC\u30C9`%0'\u306F\u975E\u63A8\u5968\u3067\u3059\u3002
EvaluationException.1=%0\u6F14\u7B97\u5B50\u306E\u30AA\u30DA\u30E9\u30F3\u30C9\u306B\u4E00\u8CAB\u6027\u304C\u3042\u308A\u307E\u305B\u3093: %1\u304A\u3088\u3073%2\u3002
EvaluationException.2=%0\u6F14\u7B97\u5B50\u306E\u30AA\u30DA\u30E9\u30F3\u30C9\u306F\u3001%1\u3067\u306F\u306A\u304F\u6570\u5024\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
EvaluationException.or=\u30D3\u30C3\u30C8\u5358\u4F4D\u306EOR\u6F14\u7B97
@@ -114,7 +114,7 @@ ParseException.badRepIDPrefix=%0 (\u884C%1): \u30A4\u30F3\u30BF\u30D5\u30A7\u30F
ParseException.badState=%0 (\u884C%1): %2\u306F\u30B9\u30C6\u30FC\u30C8\u30D5\u30EB\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u3067\u304D\u307E\u305B\u3093\u3002\u8907\u6570\u306E\u30B9\u30C6\u30FC\u30C8\u30D5\u30EB\u89AA\u304C\u3042\u308A\u307E\u3059\u3002\n%3\n%4
ParseException.branchLabel=%0 (\u884C%1): case %2\u306F\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n%3\n%4
ParseException.branchName=%0 (\u884C%1): %2\u3068\u3044\u3046\u540D\u524D\u306E\u5206\u5C90\u306F\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n%3\n%4
-ParseException.duplicateInit=%0 (\u884C%1): \u521D\u671F\u5316\u5B50\u306B\u306F\u524D\u306E\u521D\u671F\u5316\u5B50\u3068\u540C\u3058\u7F72\u540D\u304C\u3042\u308A\u307E\u3059\u3002\n%2\n%3
+ParseException.duplicateInit=%0 (\u884C%1): \u521D\u671F\u5316\u5B50\u306B\u306F\u524D\u306E\u521D\u671F\u5316\u5B50\u3068\u540C\u3058\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u3042\u308A\u307E\u3059\u3002\n%2\n%3
ParseException.duplicateState=%0 (\u884C%1): \u30C7\u30FC\u30BF\u30FB\u30E1\u30F3\u30D0\u30FC%2\u306E\u540D\u524D\u304C\u524D\u306E\u30C7\u30FC\u30BF\u30FB\u30E1\u30F3\u30D0\u30FC\u3068\u540C\u3058\u3067\u3059\u3002\n%3\n%4
ParseException.elseNoIf=%0 (\u884C%1): \u4E00\u81F4\u3059\u308B#if\u304C\u306A\u3044#else\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\n%2\n%3
ParseException.endNoIf=%0 (\u884C%1): \u4E00\u81F4\u3059\u308B#if\u304C\u306A\u3044#endif\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\n%2\n%3
@@ -146,7 +146,7 @@ ParseException.selfInherit=%0 (\u884C%1): %2\u3092\u305D\u308C\u81EA\u4F53\u304B
ParseException.stringTooLong=%0 (\u884C%1): "%2"\u306F%3\u6587\u5B57\u4EE5\u5185\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n%4\n%5
ParseException.syntax1=%0 (\u884C%1): `%2'\u304C\u5FC5\u8981\u3067\u3059\u304C\u3001`%3'\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\n%4\n%5
ParseException.syntax2=%0 (\u884C%1): %2\u306E1\u3064\u304C\u5FC5\u8981\u3067\u3059\u304C\u3001`%3'\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\n%4\n%5
-ParseException.unclosed=%0: \u30B3\u30E1\u30F3\u30C8\u3067\u4E88\u671F\u3057\u306A\u3044EOF\u3092\u691C\u51FA\u3057\u307E\u3057\u305F\u3002
+ParseException.unclosed=%0: \u30B3\u30E1\u30F3\u30C8\u3067\u4E88\u671F\u3057\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u7D42\u308F\u308A\u3092\u691C\u51FA\u3057\u307E\u3057\u305F\u3002
ParseException.undeclaredType=%0 (\u884C%1): %2\u306F\u5BA3\u8A00\u3055\u308C\u3066\u3044\u306A\u3044\u578B\u3067\u3059\u3002\n%3\n%4
ParseException.warning=%0 (\u884C%1): %2\n%3\n%4
ParseException.constExprType=%0 (\u884C%1): \u5B9A\u6570\u5F0F\u306E\u578B\u306F%2\u3067\u3059\u304C\u3001%3\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n%4\n%5
@@ -173,5 +173,5 @@ default=\u30A8\u30E9\u30FC\u3002\u5B58\u5728\u3057\u306A\u3044\u30E1\u30C3\u30BB
# -i, -d, -keep, -emitAll, -noWarn, -v, -verbose, -version, #define
# Do not translate the string "java com.sun.tools.corba.se.idl.Compile"
-usage=\u30B3\u30F3\u30D1\u30A4\u30E9\u306E\u4F7F\u7528\u65B9\u6CD5:\n\ java com.sun.tools.corba.se.idl.Compile [options] <idl file>\n<idl file>\u306FIDL\u5B9A\u7FA9\u3092\u542B\u3080\u30D5\u30A1\u30A4\u30EB\u306E\u540D\u524D\u3067\u3001\n[options]\u306F\u6B21\u306B\u30EA\u30B9\u30C8\u3059\u308B\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u7D44\u5408\u305B\u3067\u3059\u3002\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\n\u7701\u7565\u53EF\u80FD\u3067\u3001\u4EFB\u610F\u306E\u9806\u5E8F\u3067\u8868\u793A\u3055\u308C\u307E\u3059\u3002<idl file>\u306F\u5FC5\u9808\u3067\u3001\n\u6700\u5F8C\u306B\u8868\u793A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\ \n\u30AA\u30D7\u30B7\u30E7\u30F3:\n-d <symbol> IDL\u30D5\u30A1\u30A4\u30EB\u306E\u6B21\u306E\u884C\u3068\n\ \u540C\u3058\u3067\u3059: #define <symbol>\n-emitAll #included\u30D5\u30A1\u30A4\u30EB\u3067\u898B\u3064\u304B\u3063\u305F\u30BF\u30A4\u30D7\u3092\u542B\u3080\u3001\u3059\u3079\u3066\u306E\u30BF\u30A4\u30D7\u3092\n\ \u767A\u884C\u3057\u307E\u3059\u3002\n-i <include path> \u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30A4\u30F3\u30AF\u30EB\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u304C\n\ \u30B9\u30AD\u30E3\u30F3\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u5225\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002\n-keep \u751F\u6210\u3055\u308C\u308B\u30D5\u30A1\u30A4\u30EB\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u4E0A\u66F8\u304D\n\ \u3057\u307E\u305B\u3093\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u4E0A\u66F8\u304D\u3055\u308C\u307E\u3059\u3002\n-noWarn \u8B66\u544A\u3092\u51FA\u3055\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059\u3002\n-v, -verbose \u8A73\u7D30\u30E2\u30FC\u30C9\u3002\n-version \u30D0\u30FC\u30B8\u30E7\u30F3\u756A\u53F7\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n
+usage=\u30B3\u30F3\u30D1\u30A4\u30E9\u306E\u4F7F\u7528\u65B9\u6CD5:\n java com.sun.tools.corba.se.idl.Compile [options] <idl file>\n<idl file>\u306FIDL\u5B9A\u7FA9\u3092\u542B\u3080\u30D5\u30A1\u30A4\u30EB\u306E\u540D\u524D\u3067\u3001\n[options]\u306F\u6B21\u306B\u30EA\u30B9\u30C8\u3059\u308B\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u7D44\u5408\u305B\u3067\u3059\u3002\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\n\u7701\u7565\u53EF\u80FD\u3067\u3001\u4EFB\u610F\u306E\u9806\u5E8F\u3067\u8868\u793A\u3055\u308C\u307E\u3059\u3002<idl file>\u306F\u5FC5\u9808\u3067\u3001\n\u6700\u5F8C\u306B\u8868\u793A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \n\u30AA\u30D7\u30B7\u30E7\u30F3:\n-d <symbol> IDL\u30D5\u30A1\u30A4\u30EB\u306E\u6B21\u306E\u884C\u3068\n \u540C\u3058\u3067\u3059: #define <symbol>\n-emitAll #included\u30D5\u30A1\u30A4\u30EB\u3067\u898B\u3064\u304B\u3063\u305F\u30BF\u30A4\u30D7\u3092\u542B\u3080\u3001\u3059\u3079\u3066\u306E\u30BF\u30A4\u30D7\u3092\n \u767A\u884C\u3057\u307E\u3059\u3002\n-i <include path> \u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30A4\u30F3\u30AF\u30EB\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u304C\n \u30B9\u30AD\u30E3\u30F3\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u5225\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002\n-keep \u751F\u6210\u3055\u308C\u308B\u30D5\u30A1\u30A4\u30EB\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u4E0A\u66F8\u304D\n \u3057\u307E\u305B\u3093\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u4E0A\u66F8\u304D\u3055\u308C\u307E\u3059\u3002\n-noWarn \u8B66\u544A\u3092\u51FA\u3055\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059\u3002\n-v, -verbose \u8A73\u7D30\u30E2\u30FC\u30C9\u3002\n-version \u30D0\u30FC\u30B8\u30E7\u30F3\u756A\u53F7\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n
diff --git a/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp b/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp
index ed66b72..630b55d 100644
--- a/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp
+++ b/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp
@@ -173,5 +173,5 @@ default=\u9519\u8BEF! \u8BF7\u6C42\u4E86\u4E0D\u5B58\u5728\u7684\u6D88\u606F\u30
# -i, -d, -keep, -emitAll, -noWarn, -v, -verbose, -version, #define
# Do not translate the string "java com.sun.tools.corba.se.idl.Compile"
-usage=\u7F16\u8BD1\u5668\u7528\u6CD5:\n\ java com.sun.tools.corba.se.idl.Compile [\u9009\u9879] <idl \u6587\u4EF6>\n\u5176\u4E2D, <idl \u6587\u4EF6> \u662F\u5305\u542B IDL \u5B9A\u4E49\u7684\u6587\u4EF6\u7684\u540D\u79F0, \u800C\n[\u9009\u9879] \u662F\u4E0B\u5217\u9009\u9879\u7684\u4EFB\u610F\u7EC4\u5408\u3002\u8FD9\u4E9B\u9009\u9879\n\u662F\u53EF\u9009\u7684, \u5E76\u4E14\u663E\u793A\u987A\u5E8F\u5E76\u4E0D\u56FA\u5B9A; <idl \u6587\u4EF6> \u662F\u5FC5\u9700\u7684\n\u5E76\u4E14\u5FC5\u987B\u663E\u793A\u5728\u6700\u540E\u3002\n\ \n\u9009\u9879:\n-d <\u7B26\u53F7> \u8FD9\u7B49\u540C\u4E8E IDL \u6587\u4EF6\u4E2D\u7684\n\ \u4E0B\u9762\u4E00\u884C: #define <\u7B26\u53F7>\n-emitAll \u53D1\u51FA\u6240\u6709\u7C7B\u578B, \u5305\u62EC\u5728 #included\n\ \u6587\u4EF6\u4E2D\u627E\u5230\u7684\u7C7B\u578B\u3002\n-i <\u5305\u542B\u8DEF\u5F84> \u9ED8\u8BA4\u60C5\u51B5\u4E0B, \u5C06\u5728\u5F53\u524D\u76EE\u5F55\u4E2D\u626B\u63CF\n\ \u5305\u542B\u7684\u6587\u4EF6\u3002\u6B64\u9009\u9879\u5C06\u6DFB\u52A0\u53E6\u4E00\u4E2A\u76EE\u5F55\u3002\n-keep \u5982\u679C\u8981\u751F\u6210\u7684\u6587\u4EF6\u5DF2\u5B58\u5728, \u8BF7\u4E0D\u8981\n\ \u8986\u76D6\u5B83\u3002\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u4F1A\u8986\u76D6\u5B83\u3002\n-noWarn \u9690\u85CF\u8B66\u544A\u3002\n-v, -verbose \u8BE6\u7EC6\u6A21\u5F0F\u3002\n-version \u663E\u793A\u7248\u672C\u53F7\u3002\n
+usage=\u7F16\u8BD1\u5668\u7528\u6CD5:\n java com.sun.tools.corba.se.idl.Compile [\u9009\u9879] <idl \u6587\u4EF6>\n\u5176\u4E2D, <idl \u6587\u4EF6> \u662F\u5305\u542B IDL \u5B9A\u4E49\u7684\u6587\u4EF6\u7684\u540D\u79F0, \u800C\n[\u9009\u9879] \u662F\u4E0B\u5217\u9009\u9879\u7684\u4EFB\u610F\u7EC4\u5408\u3002\u8FD9\u4E9B\u9009\u9879\n\u662F\u53EF\u9009\u7684, \u5E76\u4E14\u663E\u793A\u987A\u5E8F\u5E76\u4E0D\u56FA\u5B9A; <idl \u6587\u4EF6> \u662F\u5FC5\u9700\u7684\n\u5E76\u4E14\u5FC5\u987B\u663E\u793A\u5728\u6700\u540E\u3002\n \n\u9009\u9879:\n-d <\u7B26\u53F7> \u8FD9\u7B49\u540C\u4E8E IDL \u6587\u4EF6\u4E2D\u7684\n \u4E0B\u9762\u4E00\u884C: #define <\u7B26\u53F7>\n-emitAll \u53D1\u51FA\u6240\u6709\u7C7B\u578B, \u5305\u62EC\u5728 #included\n \u6587\u4EF6\u4E2D\u627E\u5230\u7684\u7C7B\u578B\u3002\n-i <\u5305\u542B\u8DEF\u5F84> \u9ED8\u8BA4\u60C5\u51B5\u4E0B, \u5C06\u5728\u5F53\u524D\u76EE\u5F55\u4E2D\u626B\u63CF\n \u5305\u542B\u7684\u6587\u4EF6\u3002\u6B64\u9009\u9879\u5C06\u6DFB\u52A0\u53E6\u4E00\u4E2A\u76EE\u5F55\u3002\n-keep \u5982\u679C\u8981\u751F\u6210\u7684\u6587\u4EF6\u5DF2\u5B58\u5728, \u8BF7\u4E0D\u8981\n \u8986\u76D6\u5B83\u3002\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u4F1A\u8986\u76D6\u5B83\u3002\n-noWarn \u9690\u85CF\u8B66\u544A\u3002\n-v, -verbose \u8BE6\u7EC6\u6A21\u5F0F\u3002\n-version \u663E\u793A\u7248\u672C\u53F7\u3002\n
diff --git a/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp b/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp
index 1171c88..35cee81 100644
--- a/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp
+++ b/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp
@@ -53,7 +53,7 @@
#
toJavaProlog1=%0\u306B\u3088\u3063\u3066\u751F\u6210\u3055\u308C\u307E\u3057\u305F
toJavaProlog2=%0\u304B\u3089
-PreEmit.indeterminateTypeInfo=%0\u306E\u30BF\u30A4\u30D7\u60C5\u5831\u3092\u5224\u65AD\u3067\u304D\u307E\u305B\u3093\u3002
+PreEmit.indeterminateTypeInfo=%0\u306E\u30BF\u30A4\u30D7\u60C5\u5831\u3092\u5224\u5225\u3067\u304D\u307E\u305B\u3093\u3002
InterfaceGen.noImpl=%0\u306E\u30ED\u30FC\u30AB\u30EB\u5B9F\u88C5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
Version.product=IDL-to-Java\u30B3\u30F3\u30D1\u30A4\u30E9(\u30DD\u30FC\u30BF\u30D6\u30EB)\u3001\u30D0\u30FC\u30B8\u30E7\u30F3"%0"
Version.number=3.2
@@ -65,4 +65,4 @@ NameModifier.InvalidChar=\u30D1\u30BF\u30FC\u30F3\u306B\u7121\u52B9\u306A\u6587\
# -d, -emitAll, -f, -i, -keep, -m, -sep, -pkgPrefix, -td, -v, -verbose, -version, -implbase
# Do not translate the string "java com.sun.tools.corba.se.idl.toJavaPortable.Compile"
#
-usage=\u30B3\u30F3\u30D1\u30A4\u30E9\u306E\u4F7F\u7528\u65B9\u6CD5:\n\n\ java com.sun.tools.corba.se.idl.toJavaPortable.Compile [options] <idl file>\n\n<idl file>\u306FIDL\u5B9A\u7FA9\u3092\u542B\u3080\u30D5\u30A1\u30A4\u30EB\u306E\u540D\u524D\u3067\u3001\n[options]\u306F\u6B21\u306B\u30EA\u30B9\u30C8\u3059\u308B\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u7D44\u5408\u305B\u3067\u3059\u3002\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\n\u7701\u7565\u53EF\u80FD\u3067\u3001\u4EFB\u610F\u306E\u9806\u5E8F\u3067\u8868\u793A\u3055\u308C\u307E\u3059\u3002<idl file>\u306F\u5FC5\u9808\u3067\u3001\n\u6700\u5F8C\u306B\u8868\u793A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\ \n\u30AA\u30D7\u30B7\u30E7\u30F3:\n-d <symbol> IDL\u30D5\u30A1\u30A4\u30EB\u306E\u6B21\u306E\u884C\u3068\n\ \u540C\u3058\u3067\u3059: #define <symbol>\n-emitAll #included\u30D5\u30A1\u30A4\u30EB\u3067\u898B\u3064\u304B\u3063\u305F\u30BF\u30A4\u30D7\u3092\u542B\u3080\u3001\u3059\u3079\u3066\u306E\u30BF\u30A4\u30D7\u3092\u767A\u884C\u3057\u307E\u3059\u3002\n-f<side> \u767A\u884C\u3059\u308B\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002<side>\u306Fclient\u3001\n\ server\u3001all\u3001serverTIE\u3001allTIE\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002serverTIE\u3068allTIE\u306F\n\ \u59D4\u4EFB\u30E2\u30C7\u30EB\u30FB\u30B9\u30B1\u30EB\u30C8\u30F3\u3092\u767A\u884C\u3057\u307E\u3059\u3002\u3053\u306E\u30D5\u30E9\u30B0\u3092\n\ \u4F7F\u7528\u3057\u306A\u3044\u5834\u5408\u306F\u3001-fclient\u3068\u307F\u306A\u3055\u308C\u307E\u3059\u3002\n-i <include path> \u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30A4\u30F3\u30AF\u30EB\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u304C\n\ \u30B9\u30AD\u30E3\u30F3\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u5225\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002\n-keep \u751F\u6210\u3055\u308C\u308B\u30D5\u30A1\u30A4\u30EB\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u4E0A\u66F8\u304D\n\ \u3057\u307E\u305B\u3093\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u4E0A\u66F8\u304D\u3055\u308C\u307E\u3059\u3002\n-noWarn \u8B66\u544A\u3092\u51FA\u3055\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059\u3002\n-oldImplBase \u53E4\u3044(1.4\u4EE5\u524D) JDK ORB\u3068\u4E92\u63DB\u6027\u306E\u3042\u308B\u30B9\u30B1\u30EB\u30C8\u30F3\u3092\u751F\u6210\u3057\u307E\u3059\u3002\n-pkgPrefix <t> <prefix> \u30D5\u30A1\u30A4\u30EB\u30FB\u30B9\u30B3\u30FC\u30D7\u3067\u30BF\u30A4\u30D7\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u540D<t>\u304C\u691C\u51FA\u3055\u308C\u305F\u5834\u5408\u3001\n\ <t>\u306B\u5BFE\u3057\u3066\u751F\u6210\u3055\u308C\u305F\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u306EJava\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u3092\n\ <prefix>\u3067\u59CB\u3081\u307E\u3059\u3002\n-pkgTranslate <t> <pkg> \u30BF\u30A4\u30D7\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u540D<t>\u304C\u691C\u51FA\u3055\u308C\u305F\u5834\u5408\u3001\n\ \u751F\u6210\u3055\u308C\u305FJava\u30D1\u30C3\u30B1\u30FC\u30B8\u5185\u3067<pkg>\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\u3002pkgPrefix\u306E\n\ \u5909\u66F4\u304C\u5148\u306B\u884C\u308F\u308C\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002<t>\u306F\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\n\ \u6B63\u5F0F\u540D\u3068\u5B8C\u5168\u306B\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u307E\u305F\u3001<t>\u3092\n\ org\u3001org.omg\u307E\u305F\u306Forg.omg\u306E\u30B5\u30D6\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\n-skeletonName <xxx%yyy> \u30D1\u30BF\u30FC\u30F3\u306B\u5F93\u3063\u3066\u30B9\u30B1\u30EB\u30C8\u30F3\u306B\u540D\u524D\u3092\u4ED8\u3051\u307E\u3059\u3002\n\ \u30C7\u30D5\u30A9\u30EB\u30C8\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\ POA\u30D9\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\u306E\u5834\u5408\u306F%POA (-fserver\u307E\u305F\u306F-fall) \n\ oldImplBase\u30D9\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\u306E\u5834\u5408\u306F_%ImplBase\n\ (-oldImplBase\u304A\u3088\u3073(-fserver\u307E\u305F\u306F-fall))\u3002\n-td <dir> \u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u306F\u3001\u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u304B\u308F\u308A\u306B<dir>\u3092\n\ \u4F7F\u7528\u3057\u307E\u3059\u3002\n-tieName <xxx%yyy> \u30D1\u30BF\u30FC\u30F3\u306B\u5F93\u3063\u3066tie\u306B\u540D\u524D\u3092\u4ED8\u3051\u307E\u3059\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\ POA tie\u306E\u5834\u5408\u306F%POATie (-fserverTie\u307E\u305F\u306F-fallTie) \n\ oldImplBase tie\u306E\u5834\u5408\u306F%_Tie\n\ (-oldImplBase\u304A\u3088\u3073(-fserverTie\u307E\u305F\u306F-fallTie))\u3002\n-v, -verbose \u8A73\u7D30\u30E2\u30FC\u30C9\u3002\n-version \u30D0\u30FC\u30B8\u30E7\u30F3\u756A\u53F7\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\u3002\n
+usage=\u30B3\u30F3\u30D1\u30A4\u30E9\u306E\u4F7F\u7528\u65B9\u6CD5:\n\n java com.sun.tools.corba.se.idl.toJavaPortable.Compile [options] <idl file>\n\n<idl file>\u306FIDL\u5B9A\u7FA9\u3092\u542B\u3080\u30D5\u30A1\u30A4\u30EB\u306E\u540D\u524D\u3067\u3001\n[options]\u306F\u6B21\u306B\u30EA\u30B9\u30C8\u3059\u308B\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u7D44\u5408\u305B\u3067\u3059\u3002\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\n\u7701\u7565\u53EF\u80FD\u3067\u3001\u4EFB\u610F\u306E\u9806\u5E8F\u3067\u8868\u793A\u3055\u308C\u307E\u3059\u3002<idl file>\u306F\u5FC5\u9808\u3067\u3001\n\u6700\u5F8C\u306B\u8868\u793A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \n\u30AA\u30D7\u30B7\u30E7\u30F3:\n-d <symbol> IDL\u30D5\u30A1\u30A4\u30EB\u306E\u6B21\u306E\u884C\u3068\n \u540C\u3058\u3067\u3059: #define <symbol>\n-emitAll #included\u30D5\u30A1\u30A4\u30EB\u3067\u898B\u3064\u304B\u3063\u305F\u30BF\u30A4\u30D7\u3092\u542B\u3080\u3001\u3059\u3079\u3066\u306E\u30BF\u30A4\u30D7\u3092\u767A\u884C\u3057\u307E\u3059\u3002\n-f<side> \u767A\u884C\u3059\u308B\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002<side>\u306Fclient\u3001\n server\u3001all\u3001serverTIE\u3001allTIE\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002serverTIE\u3068allTIE\u306F\n \u59D4\u4EFB\u30E2\u30C7\u30EB\u30FB\u30B9\u30B1\u30EB\u30C8\u30F3\u3092\u767A\u884C\u3057\u307E\u3059\u3002\u3053\u306E\u30D5\u30E9\u30B0\u3092\n \u4F7F\u7528\u3057\u306A\u3044\u5834\u5408\u306F\u3001-fclient\u3068\u307F\u306A\u3055\u308C\u307E\u3059\u3002\n-i <include path> \u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30A4\u30F3\u30AF\u30EB\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u304C\n \u30B9\u30AD\u30E3\u30F3\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u5225\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002\n-keep \u751F\u6210\u3055\u308C\u308B\u30D5\u30A1\u30A4\u30EB\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u3001\u4E0A\u66F8\u304D\n \u3057\u307E\u305B\u3093\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u4E0A\u66F8\u304D\u3055\u308C\u307E\u3059\u3002\n-noWarn \u8B66\u544A\u3092\u51FA\u3055\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059\u3002\n-oldImplBase \u53E4\u3044(1.4\u4EE5\u524D) JDK ORB\u3068\u4E92\u63DB\u6027\u306E\u3042\u308B\u30B9\u30B1\u30EB\u30C8\u30F3\u3092\u751F\u6210\u3057\u307E\u3059\u3002\n-pkgPrefix <t> <prefix> \u30D5\u30A1\u30A4\u30EB\u30FB\u30B9\u30B3\u30FC\u30D7\u3067\u30BF\u30A4\u30D7\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u540D<t>\u304C\u691C\u51FA\u3055\u308C\u305F\u5834\u5408\u3001\n <t>\u306B\u5BFE\u3057\u3066\u751F\u6210\u3055\u308C\u305F\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u306EJava\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u3092\n <prefix>\u3067\u59CB\u3081\u307E\u3059\u3002\n-pkgTranslate <t> <pkg> \u30BF\u30A4\u30D7\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u540D<t>\u304C\u691C\u51FA\u3055\u308C\u305F\u5834\u5408\u3001\n \u751F\u6210\u3055\u308C\u305FJava\u30D1\u30C3\u30B1\u30FC\u30B8\u5185\u3067<pkg>\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\u3002pkgPrefix\u306E\n \u5909\u66F4\u304C\u5148\u306B\u884C\u308F\u308C\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002<t>\u306F\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\n \u6B63\u5F0F\u540D\u3068\u5B8C\u5168\u306B\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u307E\u305F\u3001<t>\u3092\n org\u3001org.omg\u307E\u305F\u306Forg.omg\u306E\u30B5\u30D6\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\n-skeletonName <xxx%yyy> \u30D1\u30BF\u30FC\u30F3\u306B\u5F93\u3063\u3066\u30B9\u30B1\u30EB\u30C8\u30F3\u306B\u540D\u524D\u3092\u4ED8\u3051\u307E\u3059\u3002\n \u30C7\u30D5\u30A9\u30EB\u30C8\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n POA\u30D9\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\u306E\u5834\u5408\u306F%POA (-fserver\u307E\u305F\u306F-fall) \n oldImplBase\u30D9\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\u306E\u5834\u5408\u306F_%ImplBase\n (-oldImplBase\u304A\u3088\u3073(-fserver\u307E\u305F\u306F-fall))\u3002\n-td <dir> \u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u306F\u3001\u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u304B\u308F\u308A\u306B<dir>\u3092\n \u4F7F\u7528\u3057\u307E\u3059\u3002\n-tieName <xxx%yyy> \u30D1\u30BF\u30FC\u30F3\u306B\u5F93\u3063\u3066tie\u306B\u540D\u524D\u3092\u4ED8\u3051\u307E\u3059\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n POA tie\u306E\u5834\u5408\u306F%POATie (-fserverTie\u307E\u305F\u306F-fallTie) \n oldImplBase tie\u306E\u5834\u5408\u306F%_Tie\n (-oldImplBase\u304A\u3088\u3073(-fserverTie\u307E\u305F\u306F-fallTie))\u3002\n-v, -verbose \u8A73\u7D30\u30E2\u30FC\u30C9\u3002\n-version \u30D0\u30FC\u30B8\u30E7\u30F3\u756A\u53F7\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\u3002\n
diff --git a/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp b/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp
index dd385be..ee77a65 100644
--- a/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp
+++ b/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp
@@ -65,4 +65,4 @@ NameModifier.InvalidChar=\u6A21\u5F0F\u4E2D\u5305\u542B\u65E0\u6548\u5B57\u7B26
# -d, -emitAll, -f, -i, -keep, -m, -sep, -pkgPrefix, -td, -v, -verbose, -version, -implbase
# Do not translate the string "java com.sun.tools.corba.se.idl.toJavaPortable.Compile"
#
-usage=\u7F16\u8BD1\u5668\u7528\u6CD5:\n\n\ java com.sun.tools.corba.se.idl.toJavaPortable.Compile [\u9009\u9879] <idl \u6587\u4EF6>\n\n\u5176\u4E2D, <idl \u6587\u4EF6> \u662F\u5305\u542B IDL \u5B9A\u4E49\u7684\u6587\u4EF6\u7684\u540D\u79F0, \u800C\n[\u9009\u9879] \u662F\u4E0B\u5217\u9009\u9879\u7684\u4EFB\u610F\u7EC4\u5408\u3002\u9009\u9879\n\u662F\u53EF\u9009\u7684, \u5E76\u4E14\u663E\u793A\u987A\u5E8F\u5E76\u4E0D\u56FA\u5B9A; <idl \u6587\u4EF6> \u662F\u5FC5\u9700\u7684,\n\u5E76\u4E14\u5FC5\u987B\u663E\u793A\u5728\u6700\u540E\u3002\n\ \n\u9009\u9879:\n-d <\u7B26\u53F7> \u8FD9\u7B49\u540C\u4E8E IDL \u6587\u4EF6\u4E2D\u7684\n\ \u4E0B\u9762\u4E00\u884C: #define <\u7B26\u53F7>\n-emitAll \u53D1\u51FA\u6240\u6709\u7C7B\u578B, \u5305\u62EC\u5728 #included \u6587\u4EF6\u4E2D\u627E\u5230\u7684\u7C7B\u578B\u3002\n-f<side> \u5B9A\u4E49\u8981\u53D1\u51FA\u54EA\u4E9B\u7ED1\u5B9A\u3002<side> \u662F client,\n\ server, all, serverTIE, allTIE \u4E4B\u4E00\u3002serverTIE \u548C allTIE\n\ \u5BFC\u81F4\u53D1\u51FA\u59D4\u6D3E\u6A21\u578B\u9AA8\u67B6\u3002\u5982\u679C\u672A\u4F7F\u7528\n\ \u6B64\u6807\u8BB0, \u5C06\u5047\u5B9A\u4E3A -fclient\u3002\n-i <\u5305\u542B\u8DEF\u5F84> \u9ED8\u8BA4\u60C5\u51B5\u4E0B, \u5C06\u5728\u5F53\u524D\u76EE\u5F55\u4E2D\u626B\u63CF\n\ \u5305\u542B\u7684\u6587\u4EF6\u3002\u6B64\u9009\u9879\u5C06\u6DFB\u52A0\u53E6\u4E00\u4E2A\u76EE\u5F55\u3002\n-keep \u5982\u679C\u8981\u751F\u6210\u7684\u6587\u4EF6\u5DF2\u5B58\u5728, \u8BF7\u4E0D\u8981\n\ \u8986\u76D6\u5B83\u3002\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u4F1A\u8986\u76D6\u5B83\u3002\n-noWarn \u9690\u85CF\u8B66\u544A\u3002\n-oldImplBase \u751F\u6210\u4E0E\u65E7\u7248 (1.4 \u7248\u4E4B\u524D) JDK ORB \u517C\u5BB9\u7684\u9AA8\u67B6\u3002\n-pkgPrefix <t> <\u524D\u7F00> \u5F53\u5728\u6587\u4EF6\u8303\u56F4\u5185\u9047\u5230\u7C7B\u578B\u6216\u6A21\u5757\u540D <t> \u65F6,\n\ \u5728\u4E3A <t> \u751F\u6210\u7684\u6240\u6709\u6587\u4EF6\u7684 Java \u7A0B\u5E8F\u5305\u540D\u524D\n\ \u6DFB\u52A0 <\u524D\u7F00>\u3002\n-pkgTranslate <t> <pkg> \u5F53\u9047\u5230\u7C7B\u578B\u6216\u6A21\u5757\u540D <t> \u65F6, \u5728\n\ \u751F\u6210\u7684 Java \u7A0B\u5E8F\u5305\u4E2D\u5C06\u5176\u66FF\u6362\u4E3A <pkg>\u3002\u8BF7\u6CE8\u610F, \n\ \u5C06\u9996\u5148\u8FDB\u884C pkgPrefix \u66F4\u6539\u3002<t> \u5FC5\u987B\u4E0E\n\ \u5B8C\u6574\u7A0B\u5E8F\u5305\u540D\u5B8C\u5168\u5339\u914D\u3002\u53E6\u5916, <t> \u4E0D\u80FD\u4E3A\n\ org, org.omg \u6216 org.omg \u7684\u4EFB\u4F55\u5B50\u7A0B\u5E8F\u5305\u3002\n-skeletonName <xxx%yyy> \u6839\u636E\u6A21\u5F0F\u547D\u540D\u9AA8\u67B6\u3002\n\ \u9ED8\u8BA4\u503C\u4E3A:\n\ %POA \u8868\u793A POA \u57FA\u7C7B (-fserver \u6216 -fall) \n\ _%ImplBase \u8868\u793A oldImplBase \u57FA\u7C7B\n\ (-oldImplBase \u548C (-fserver \u6216 -fall))\u3002\n-td <dir> \u4F7F\u7528 <dir> \u8868\u793A\u8F93\u51FA\u76EE\u5F55\u4EE5\u4EE3\u66FF\n\ \u5F53\u524D\u76EE\u5F55\u3002\n-tieName <xxx%yyy> \u6839\u636E\u6A21\u5F0F\u547D\u540D tie\u3002\u9ED8\u8BA4\u503C\u4E3A:\n\ %POATie \u8868\u793A POA tie (-fserverTie \u6216 -fallTie) \n\ %_Tie \u8868\u793A oldImplBase tie\n\ (-oldImplBase \u548C (-fserverTie \u6216 -fallTie))\u3002\n-v, -verbose \u8BE6\u7EC6\u6A21\u5F0F\u3002\n-version \u663E\u793A\u7248\u672C\u53F7\u5E76\u9000\u51FA\u3002\n
+usage=\u7F16\u8BD1\u5668\u7528\u6CD5:\n\n java com.sun.tools.corba.se.idl.toJavaPortable.Compile [\u9009\u9879] <idl \u6587\u4EF6>\n\n\u5176\u4E2D, <idl \u6587\u4EF6> \u662F\u5305\u542B IDL \u5B9A\u4E49\u7684\u6587\u4EF6\u7684\u540D\u79F0, \u800C\n[\u9009\u9879] \u662F\u4E0B\u5217\u9009\u9879\u7684\u4EFB\u610F\u7EC4\u5408\u3002\u9009\u9879\n\u662F\u53EF\u9009\u7684, \u5E76\u4E14\u663E\u793A\u987A\u5E8F\u5E76\u4E0D\u56FA\u5B9A; <idl \u6587\u4EF6> \u662F\u5FC5\u9700\u7684,\n\u5E76\u4E14\u5FC5\u987B\u663E\u793A\u5728\u6700\u540E\u3002\n \n\u9009\u9879:\n-d <\u7B26\u53F7> \u8FD9\u7B49\u540C\u4E8E IDL \u6587\u4EF6\u4E2D\u7684\n \u4E0B\u9762\u4E00\u884C: #define <\u7B26\u53F7>\n-emitAll \u53D1\u51FA\u6240\u6709\u7C7B\u578B, \u5305\u62EC\u5728 #included \u6587\u4EF6\u4E2D\u627E\u5230\u7684\u7C7B\u578B\u3002\n-f<side> \u5B9A\u4E49\u8981\u53D1\u51FA\u54EA\u4E9B\u7ED1\u5B9A\u3002<side> \u662F client,\n server, all, serverTIE, allTIE \u4E4B\u4E00\u3002serverTIE \u548C allTIE\n \u5BFC\u81F4\u53D1\u51FA\u59D4\u6D3E\u6A21\u578B\u9AA8\u67B6\u3002\u5982\u679C\u672A\u4F7F\u7528\n \u6B64\u6807\u8BB0, \u5C06\u5047\u5B9A\u4E3A -fclient\u3002\n-i <\u5305\u542B\u8DEF\u5F84> \u9ED8\u8BA4\u60C5\u51B5\u4E0B, \u5C06\u5728\u5F53\u524D\u76EE\u5F55\u4E2D\u626B\u63CF\n \u5305\u542B\u7684\u6587\u4EF6\u3002\u6B64\u9009\u9879\u5C06\u6DFB\u52A0\u53E6\u4E00\u4E2A\u76EE\u5F55\u3002\n-keep \u5982\u679C\u8981\u751F\u6210\u7684\u6587\u4EF6\u5DF2\u5B58\u5728, \u8BF7\u4E0D\u8981\n \u8986\u76D6\u5B83\u3002\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u4F1A\u8986\u76D6\u5B83\u3002\n-noWarn \u9690\u85CF\u8B66\u544A\u3002\n-oldImplBase \u751F\u6210\u4E0E\u65E7\u7248 (1.4 \u7248\u4E4B\u524D) JDK ORB \u517C\u5BB9\u7684\u9AA8\u67B6\u3002\n-pkgPrefix <t> <\u524D\u7F00> \u5F53\u5728\u6587\u4EF6\u8303\u56F4\u5185\u9047\u5230\u7C7B\u578B\u6216\u6A21\u5757\u540D <t> \u65F6,\n \u5728\u4E3A <t> \u751F\u6210\u7684\u6240\u6709\u6587\u4EF6\u7684 Java \u7A0B\u5E8F\u5305\u540D\u524D\n \u6DFB\u52A0 <\u524D\u7F00>\u3002\n-pkgTranslate <t> <pkg> \u5F53\u9047\u5230\u7C7B\u578B\u6216\u6A21\u5757\u540D <t> \u65F6, \u5728\n \u751F\u6210\u7684 Java \u7A0B\u5E8F\u5305\u4E2D\u5C06\u5176\u66FF\u6362\u4E3A <pkg>\u3002\u8BF7\u6CE8\u610F, \n \u5C06\u9996\u5148\u8FDB\u884C pkgPrefix \u66F4\u6539\u3002<t> \u5FC5\u987B\u4E0E\n \u5B8C\u6574\u7A0B\u5E8F\u5305\u540D\u5B8C\u5168\u5339\u914D\u3002\u53E6\u5916, <t> \u4E0D\u80FD\u4E3A\n org, org.omg \u6216 org.omg \u7684\u4EFB\u4F55\u5B50\u7A0B\u5E8F\u5305\u3002\n-skeletonName <xxx%yyy> \u6839\u636E\u6A21\u5F0F\u547D\u540D\u9AA8\u67B6\u3002\n \u9ED8\u8BA4\u503C\u4E3A:\n %POA \u8868\u793A POA \u57FA\u7C7B (-fserver \u6216 -fall) \n _%ImplBase \u8868\u793A oldImplBase \u57FA\u7C7B\n (-oldImplBase \u548C (-fserver \u6216 -fall))\u3002\n-td <dir> \u4F7F\u7528 <dir> \u8868\u793A\u8F93\u51FA\u76EE\u5F55\u4EE5\u4EE3\u66FF\n \u5F53\u524D\u76EE\u5F55\u3002\n-tieName <xxx%yyy> \u6839\u636E\u6A21\u5F0F\u547D\u540D tie\u3002\u9ED8\u8BA4\u503C\u4E3A:\n %POATie \u8868\u793A POA tie (-fserverTie \u6216 -fallTie) \n %_Tie \u8868\u793A oldImplBase tie\n (-oldImplBase \u548C (-fserverTie \u6216 -fallTie))\u3002\n-v, -verbose \u8BE6\u7EC6\u6A21\u5F0F\u3002\n-version \u663E\u793A\u7248\u672C\u53F7\u5E76\u9000\u51FA\u3002\n
diff --git a/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java b/src/share/classes/sun/corba/JavaCorbaAccess.java
index 1946f5e..046453f 100644
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java
+++ b/src/share/classes/sun/corba/JavaCorbaAccess.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,32 +23,10 @@
* questions.
*/
-/*
- */
-package com.sun.corba.se.impl.orbutil;
-
-import java.io.*;
-import java.util.Hashtable;
-
-/**
- * Implements legacy behavior from Ladybird to maintain
- * backwards compatibility.
- */
-public class IIOPInputStream_1_3_1 extends com.sun.corba.se.impl.io.IIOPInputStream
-{
- public IIOPInputStream_1_3_1()
- throws java.io.IOException {
- super();
- }
+package sun.corba;
- /**
- * Before JDK 1.3.1_01, the PutField/GetField implementation
- * actually sent a Hashtable.
- */
- public ObjectInputStream.GetField readFields()
- throws IOException, ClassNotFoundException, NotActiveException {
+import com.sun.corba.se.impl.io.ValueHandlerImpl;
- Hashtable fields = (Hashtable)readObject();
- return new LegacyHookGetFields(fields);
- }
+public interface JavaCorbaAccess {
+ public ValueHandlerImpl newValueHandlerImpl();
}
diff --git a/src/share/classes/sun/corba/SharedSecrets.java b/src/share/classes/sun/corba/SharedSecrets.java
new file mode 100644
index 0000000..aba3ee0
--- /dev/null
+++ b/src/share/classes/sun/corba/SharedSecrets.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.corba;
+
+import com.sun.corba.se.impl.io.ValueUtility;
+import sun.misc.Unsafe;
+
+import java.security.AccessController;
+
+/** A repository of "shared secrets", which are a mechanism for
+ calling implementation-private methods in another package without
+ using reflection. A package-private class implements a public
+ interface and provides the ability to call package-private methods
+ within that package; the object implementing that interface is
+ provided through a third package to which access is restricted.
+ This framework avoids the primary disadvantage of using reflection
+ for this purpose, namely the loss of compile-time checking. */
+
+// SharedSecrets cloned in corba repo to avoid build issues
+public class SharedSecrets {
+ private static final Unsafe unsafe = Unsafe.getUnsafe();
+ private static JavaCorbaAccess javaCorbaAccess;
+
+ public static JavaCorbaAccess getJavaCorbaAccess() {
+ if (javaCorbaAccess == null) {
+ // Ensure ValueUtility is initialized; we know that that class
+ // provides the shared secret
+ unsafe.ensureClassInitialized(ValueUtility.class);
+ }
+ return javaCorbaAccess;
+ }
+
+ public static void setJavaCorbaAccess(JavaCorbaAccess access) {
+ javaCorbaAccess = access;
+ }
+
+}