/hg/release/icedtea7-forest-2.4/corba: 3 new changesets
omajid at icedtea.classpath.org
omajid at icedtea.classpath.org
Tue Jan 14 13:04:22 PST 2014
changeset 64ec1c622f36 in /hg/release/icedtea7-forest-2.4/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/corba?cmd=changeset;node=64ec1c622f36
author: alanb
date: Tue Oct 22 11:40:27 2013 +0100
8021257: com.sun.corba.se.** should be on restricted package list
Reviewed-by: chegar, coffeys, smarks
Contributed-by: alan.bateman at oralce.com, mark.sheppard at oracle.com
changeset 00edd61ba731 in /hg/release/icedtea7-forest-2.4/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/corba?cmd=changeset;node=00edd61ba731
author: msheppar
date: Sat Nov 02 01:24:03 2013 +0000
8025767: Enhance IIOP Streams
Summary: modify org.omg.CORBA_2_3.portable.InputStream inheritance structure.
Reviewed-by: alanb, coffeys, skoivu
changeset 468a4fe3400a in /hg/release/icedtea7-forest-2.4/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/corba?cmd=changeset;node=468a4fe3400a
author: msheppar
date: Sat Nov 02 01:07:53 2013 +0000
8026193: Enhance CORBA stub factories
Summary: modify com.sun.corba.se.impl.presenetation.rmi.StubFactoryDynamicBase inheritance structure.
Reviewed-by: alanb, coffeys, ahgross
diffstat:
src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java | 17 +-
src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java | 7 +-
src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java | 14 +-
src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java | 14 +-
src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java | 8 +-
src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java | 7 +-
src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java | 14 +-
src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java | 2 +-
src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java | 8 +-
src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java | 6 +-
src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java | 6 +-
src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java | 24 +-
src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java | 17 +-
src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java | 7 +-
src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java | 35 +-
src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java | 8 +-
src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java | 15 +-
src/share/classes/javax/rmi/CORBA/Stub.java | 8 +-
src/share/classes/javax/rmi/CORBA/Util.java | 13 +-
src/share/classes/javax/rmi/PortableRemoteObject.java | 11 +-
src/share/classes/org/omg/CORBA/ORB.java | 34 +-
src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java | 43 ++-
src/share/classes/sun/corba/EncapsInputStreamFactory.java | 153 ++++++++++
23 files changed, 360 insertions(+), 111 deletions(-)
diffs (truncated from 1001 to 500 lines):
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java
--- a/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java Sat Nov 02 01:07:53 2013 +0000
@@ -82,11 +82,18 @@
super((ORB)orb);
}
- public org.omg.CORBA.portable.InputStream create_input_stream()
- {
- return new AnyInputStream(
- (com.sun.corba.se.impl.encoding.EncapsInputStream)
- super.create_input_stream());
+ public org.omg.CORBA.portable.InputStream create_input_stream() {
+ final org.omg.CORBA.portable.InputStream is = super
+ .create_input_stream();
+ AnyInputStream aIS = AccessController
+ .doPrivileged(new PrivilegedAction<AnyInputStream>() {
+ @Override
+ public AnyInputStream run() {
+ return new AnyInputStream(
+ (com.sun.corba.se.impl.encoding.EncapsInputStream) is);
+ }
+ });
+ return aIS;
}
}
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java
--- a/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
@@ -36,11 +36,10 @@
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
import com.sun.corba.se.spi.orb.ORB;
-
import com.sun.corba.se.spi.logging.CORBALogDomains;
-
import com.sun.corba.se.impl.logging.ORBUtilSystemException;
+import sun.corba.EncapsInputStreamFactory;
/**
* Encapsulations are supposed to explicitly define their
* code sets and GIOP version. The original resolution to issue 2784
@@ -148,7 +147,7 @@
}
public CDRInputStream dup() {
- return new EncapsInputStream(this);
+ return EncapsInputStreamFactory.newEncapsInputStream(this);
}
protected CodeSetConversion.BTCConverter createCharBTCConverter() {
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java
--- a/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
@@ -39,6 +39,8 @@
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
import com.sun.corba.se.impl.orbutil.ORBConstants;
+import sun.corba.EncapsInputStreamFactory;
+
/**
* Encapsulations are supposed to explicitly define their
* code sets and GIOP version. The original resolution to issue 2784
@@ -107,11 +109,11 @@
public org.omg.CORBA.portable.InputStream create_input_stream() {
freeInternalCaches();
- return new EncapsInputStream(orb(),
- getByteBuffer(),
- getSize(),
- isLittleEndian(),
- getGIOPVersion());
+ return EncapsInputStreamFactory.newEncapsInputStream(orb(),
+ getByteBuffer(),
+ getSize(),
+ isLittleEndian(),
+ getGIOPVersion());
}
protected CodeSetConversion.CTBConverter createCharCTBConverter() {
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java
--- a/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, 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
@@ -64,6 +64,8 @@
import com.sun.corba.se.impl.encoding.CDROutputStream;
import com.sun.corba.se.impl.encoding.MarshalInputStream;
+import sun.corba.EncapsInputStreamFactory;
+
public class TypeCodeInputStream extends EncapsInputStream implements TypeCodeReader
{
private Map typeMap = null;
@@ -157,11 +159,13 @@
// create an encapsulation using the marshal buffer
if (is instanceof CDRInputStream) {
- encap = new TypeCodeInputStream((ORB)_orb, encapBuffer, encapBuffer.length,
- ((CDRInputStream)is).isLittleEndian(),
- ((CDRInputStream)is).getGIOPVersion());
+ encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
+ encapBuffer, encapBuffer.length,
+ ((CDRInputStream) is).isLittleEndian(),
+ ((CDRInputStream) is).getGIOPVersion());
} else {
- encap = new TypeCodeInputStream((ORB)_orb, encapBuffer, encapBuffer.length);
+ encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
+ encapBuffer, encapBuffer.length);
}
encap.setEnclosingInputStream(is);
encap.makeEncapsulation();
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java
--- a/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java Sat Nov 02 01:07:53 2013 +0000
@@ -61,6 +61,8 @@
import java.math.BigInteger;
import java.nio.ByteBuffer;
+import sun.corba.EncapsInputStreamFactory;
+
public final class TypeCodeOutputStream extends EncapsOutputStream
{
private OutputStream enclosure = null;
@@ -77,9 +79,9 @@
public org.omg.CORBA.portable.InputStream create_input_stream()
{
- //return new TypeCodeInputStream((ORB)orb(), getByteBuffer(), getIndex(), isLittleEndian());
- TypeCodeInputStream tcis
- = new TypeCodeInputStream((ORB)orb(), getByteBuffer(), getIndex(), isLittleEndian(), getGIOPVersion());
+ TypeCodeInputStream tcis = EncapsInputStreamFactory
+ .newTypeCodeInputStream((ORB) orb(), getByteBuffer(),
+ getIndex(), isLittleEndian(), getGIOPVersion());
//if (TypeCodeImpl.debug) {
//System.out.println("Created TypeCodeInputStream " + tcis + " with no parent");
//tcis.printBuffer();
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java
--- a/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java Sat Nov 02 01:07:53 2013 +0000
@@ -33,6 +33,8 @@
import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
import com.sun.corba.se.spi.logging.CORBALogDomains;
+import sun.corba.EncapsInputStreamFactory;
+
import com.sun.corba.se.impl.corba.AnyImpl;
import com.sun.corba.se.impl.encoding.EncapsInputStream;
import com.sun.corba.se.impl.encoding.EncapsOutputStream;
@@ -193,8 +195,9 @@
// it is turned into a FormatMismatch exception.
try {
- EncapsInputStream cdrIn = new EncapsInputStream( orb, data,
- data.length, giopVersion );
+ EncapsInputStream cdrIn = EncapsInputStreamFactory.newEncapsInputStream( orb, data,
+ data.length, giopVersion );
+
cdrIn.consumeEndian();
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java
--- a/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -370,7 +370,7 @@
* @exception IOException Any of the usual Input/Output related exceptions.
* @since JDK1.1
*/
- public final Object readObjectDelegate() throws IOException
+ public final synchronized Object readObjectDelegate() throws IOException
{
try {
@@ -389,7 +389,7 @@
}
}
- final Object simpleReadObject(Class clz,
+ final synchronized Object simpleReadObject(Class clz,
String repositoryID,
com.sun.org.omg.SendingContext.CodeBase sender,
int offset)
@@ -461,7 +461,7 @@
return obj;
}
- public final void simpleSkipObject(String repositoryID,
+ public final synchronized void simpleSkipObject(String repositoryID,
com.sun.org.omg.SendingContext.CodeBase sender)
/* throws OptionalDataException, ClassNotFoundException, IOException */
{
@@ -559,7 +559,7 @@
* objects.
* @since JDK1.1
*/
- public final void defaultReadObjectDelegate()
+ final synchronized void defaultReadObjectDelegate()
/* throws IOException, ClassNotFoundException, NotActiveException */
{
try {
@@ -988,7 +988,7 @@
}
}
- private Object inputObject(Class clz,
+ private synchronized Object inputObject(Class clz,
String repositoryID,
com.sun.org.omg.SendingContext.CodeBase sender,
int offset)
@@ -1317,7 +1317,7 @@
* a form of custom marshaling.
*
*/
- private Object inputObjectUsingFVD(Class clz,
+ private synchronized Object inputObjectUsingFVD(Class clz,
String repositoryID,
com.sun.org.omg.SendingContext.CodeBase sender,
int offset)
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java
--- a/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java Sat Nov 02 01:07:53 2013 +0000
@@ -201,7 +201,7 @@
readObjectState.endDefaultReadObject(this);
}
- public abstract void defaultReadObjectDelegate();
+ abstract void defaultReadObjectDelegate();
abstract void readFields(java.util.Map fieldToValueMap)
throws java.io.InvalidClassException, java.io.StreamCorruptedException,
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java
--- a/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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
@@ -47,6 +47,8 @@
import com.sun.corba.se.impl.encoding.EncapsOutputStream ;
import com.sun.corba.se.impl.encoding.EncapsInputStream ;
+import sun.corba.EncapsInputStreamFactory;
+
/**
* This static utility class contains various utility methods for reading and
* writing CDR encapsulations.
@@ -108,8 +110,8 @@
static public InputStream getEncapsulationStream( InputStream is )
{
byte[] data = readOctets( is ) ;
- EncapsInputStream result = new EncapsInputStream( is.orb(), data,
- data.length ) ;
+ EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data,
+ data.length ) ;
result.consumeEndian() ;
return result ;
}
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java
--- a/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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
@@ -49,6 +49,8 @@
import com.sun.corba.se.impl.logging.IORSystemException ;
import com.sun.corba.se.impl.encoding.EncapsInputStream ;
+import sun.corba.EncapsInputStreamFactory;
+
/** Based on the magic and scid, return the appropriate
* ObjectKeyTemplate. Expects to be called with a valid
@@ -217,7 +219,7 @@
public ObjectKey create( byte[] key )
{
OctetSeqHolder osh = new OctetSeqHolder() ;
- EncapsInputStream is = new EncapsInputStream( orb, key, key.length ) ;
+ EncapsInputStream is = EncapsInputStreamFactory.newEncapsInputStream( orb, key, key.length );
ObjectKeyTemplate oktemp = create( is, fullKey, osh ) ;
if (oktemp == null)
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java
--- a/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java Sat Nov 02 01:07:53 2013 +0000
@@ -70,6 +70,8 @@
import com.sun.corba.se.impl.encoding.EncapsInputStream ;
import com.sun.corba.se.impl.encoding.EncapsOutputStream ;
+import sun.corba.EncapsInputStreamFactory;
+
import com.sun.corba.se.impl.util.JDKBridge;
import com.sun.corba.se.impl.logging.IORSystemException;
@@ -170,8 +172,8 @@
throw wrapper.invalidTaggedProfile() ;
}
- EncapsInputStream istr = new EncapsInputStream((ORB)orb, profile.profile_data,
- profile.profile_data.length);
+ EncapsInputStream istr = EncapsInputStreamFactory.newEncapsInputStream((ORB)orb, profile.profile_data,
+ profile.profile_data.length);
istr.consumeEndian();
init( istr ) ;
}
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java
--- a/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,6 +25,7 @@
package com.sun.corba.se.impl.presentation.rmi ;
+import java.io.SerializablePermission;
import java.lang.reflect.InvocationHandler ;
import java.lang.reflect.Proxy ;
@@ -38,11 +39,18 @@
{
protected final ClassLoader loader ;
- public StubFactoryDynamicBase( PresentationManager.ClassData classData,
- ClassLoader loader )
- {
- super( classData ) ;
+ private static Void checkPermission() {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ sm.checkPermission(new SerializablePermission(
+ "enableSubclassImplementation"));
+ }
+ return null;
+ }
+ private StubFactoryDynamicBase(Void unused,
+ PresentationManager.ClassData classData, ClassLoader loader) {
+ super(classData);
// this.loader must not be null, or the newProxyInstance call
// will fail.
if (loader == null) {
@@ -55,5 +63,11 @@
}
}
+ public StubFactoryDynamicBase( PresentationManager.ClassData classData,
+ ClassLoader loader )
+ {
+ this (checkPermission(), classData, loader);
+ }
+
public abstract org.omg.CORBA.Object makeStub() ;
}
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java
--- a/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,14 +25,23 @@
package com.sun.corba.se.impl.presentation.rmi;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
import com.sun.corba.se.spi.presentation.rmi.PresentationManager ;
public class StubFactoryFactoryProxyImpl extends StubFactoryFactoryDynamicBase
{
public PresentationManager.StubFactory makeDynamicStubFactory(
- PresentationManager pm, PresentationManager.ClassData classData,
- ClassLoader classLoader )
+ PresentationManager pm, final PresentationManager.ClassData classData,
+ final ClassLoader classLoader )
{
- return new StubFactoryProxyImpl( classData, classLoader ) ;
+ return AccessController
+ .doPrivileged(new PrivilegedAction<StubFactoryProxyImpl>() {
+ @Override
+ public StubFactoryProxyImpl run() {
+ return new StubFactoryProxyImpl(classData, classLoader);
+ }
+ });
}
}
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java
--- a/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
@@ -115,6 +115,7 @@
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
+import sun.corba.EncapsInputStreamFactory;
/**
* ClientDelegate is the RMI client-side subcontract or representation
@@ -847,8 +848,8 @@
}
byte[] data = ((UnknownServiceContext)sc).getData();
EncapsInputStream in =
- new EncapsInputStream((ORB)messageMediator.getBroker(),
- data, data.length);
+ EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
+ data, data.length);
in.consumeEndian();
String msg =
diff -r 2b24b81f4555 -r 468a4fe3400a src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java
--- a/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java Wed Oct 23 05:22:18 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java Sat Nov 02 01:07:53 2013 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -36,7 +36,8 @@
import java.util.Iterator;
import java.rmi.RemoteException;
import java.nio.ByteBuffer;
-
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import javax.rmi.CORBA.Util;
import javax.rmi.CORBA.Tie;
@@ -111,6 +112,7 @@
import com.sun.corba.se.impl.protocol.giopmsgheaders.ProfileAddr;
import com.sun.corba.se.impl.protocol.giopmsgheaders.ReferenceAddr;
import com.sun.corba.se.impl.transport.CorbaContactInfoListIteratorImpl;
+import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
import com.sun.corba.se.impl.util.JDKBridge;
/**
@@ -156,10 +158,17 @@
ByteBufferWithInfo bbwi = cdrOutputObject.getByteBufferWithInfo();
cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize());
-
- CDRInputObject cdrInputObject =
- new CDRInputObject(orb, null, bbwi.byteBuffer,
- cdrOutputObject.getMessageHeader());
+ final ORB inOrb = orb;
+ final ByteBuffer inBuffer = bbwi.byteBuffer;
+ final Message inMsg = cdrOutputObject.getMessageHeader();
+ CDRInputObject cdrInputObject = AccessController
+ .doPrivileged(new PrivilegedAction<CDRInputObject>() {
+ @Override
+ public CDRInputObject run() {
More information about the distro-pkg-dev
mailing list