mirror of
https://github.com/openjdk/jdk8u.git
synced 2025-12-15 14:22:57 -06:00
8285021: Improve CORBA communication
Co-authored-by: Joshua Cao <joshcao@amazon.com> Reviewed-by: mbalao, bae, andrew
This commit is contained in:
parent
ebc5e190ac
commit
259a33e4e1
@ -317,6 +317,8 @@ public class ORBConstants {
|
||||
public static final String DYNAMIC_STUB_FACTORY_FACTORY_CLASS =
|
||||
SUN_PREFIX + "ORBDynamicStubFactoryFactoryClass" ;
|
||||
|
||||
public static final String ALLOW_DESERIALIZE_OBJECT = SUN_PREFIX + "ORBAllowDeserializeObject" ;
|
||||
|
||||
// Constants for NameService properties ************************************
|
||||
|
||||
public static final int DEFAULT_INITIAL_PORT = 900;
|
||||
|
||||
@ -342,6 +342,11 @@ public class Stub implements AuxGen
|
||||
stream.println (" private void readObject (java.io.ObjectInputStream s) throws java.io.IOException");
|
||||
stream.println (" {");
|
||||
stream.println (" String str = s.readUTF ();");
|
||||
if ("DynAnyFactory".equals (i.name ())) {
|
||||
stream.println (" if (!str.startsWith(com.sun.corba.se.impl.orbutil.ORBConstants.STRINGIFY_PREFIX) &&");
|
||||
stream.println (" !Boolean.getBoolean(com.sun.corba.se.impl.orbutil.ORBConstants.ALLOW_DESERIALIZE_OBJECT))");
|
||||
stream.println (" throw new java.io.InvalidObjectException(\"IOR: expected\");");
|
||||
}
|
||||
stream.println (" String[] args = null;");
|
||||
stream.println (" java.util.Properties props = null;");
|
||||
stream.println (" org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user