Mon, 08 Apr 2013 23:12:03 +0100
8001032: Restrict object access
Summary: Restrict object access; fix reviewed also by Alexander Fomin
Reviewed-by: alanb, ahgross
1.1 --- a/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk Thu Apr 11 09:39:48 2013 -0700 1.2 +++ b/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk Mon Apr 08 23:12:03 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 # 1.5 -# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 +# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 # 1.9 # This code is free software; you can redistribute it and/or modify it 1.10 @@ -39,7 +39,6 @@ 1.11 com/sun/corba/se/impl/orbutil/ObjectStreamClassUtil_1_3.java \ 1.12 com/sun/corba/se/impl/orbutil/ORBConstants.java \ 1.13 com/sun/corba/se/impl/orbutil/ORBUtility.java \ 1.14 - com/sun/corba/se/impl/orbutil/ORBClassLoader.java \ 1.15 com/sun/corba/se/impl/orbutil/RepIdDelegator.java \ 1.16 com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java \ 1.17 com/sun/corba/se/impl/orbutil/RepositoryIdStrings.java \
2.1 --- a/src/share/classes/com/sun/corba/se/impl/activation/ServerManagerImpl.java Thu Apr 11 09:39:48 2013 -0700 2.2 +++ b/src/share/classes/com/sun/corba/se/impl/activation/ServerManagerImpl.java Mon Apr 08 23:12:03 2013 +0100 2.3 @@ -1,5 +1,5 @@ 2.4 /* 2.5 - * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. 2.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 * 2.9 * This code is free software; you can redistribute it and/or modify it 2.10 @@ -81,7 +81,6 @@ 2.11 2.12 import com.sun.corba.se.impl.oa.poa.BadServerIdHandler; 2.13 import com.sun.corba.se.impl.orbutil.ORBConstants; 2.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader; 2.15 import com.sun.corba.se.impl.orbutil.ORBUtility; 2.16 import com.sun.corba.se.impl.util.Utility; 2.17
3.1 --- a/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java Thu Apr 11 09:39:48 2013 -0700 3.2 +++ b/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java Mon Apr 08 23:12:03 2013 +0100 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 3.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 * 3.9 * This code is free software; you can redistribute it and/or modify it 3.10 @@ -77,7 +77,6 @@ 3.11 import com.sun.corba.se.impl.logging.ORBUtilSystemException; 3.12 import com.sun.corba.se.impl.logging.OMGSystemException; 3.13 import com.sun.corba.se.impl.corba.RequestImpl; 3.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader; 3.15 import com.sun.corba.se.impl.orbutil.ORBConstants; 3.16 import com.sun.corba.se.impl.orbutil.ORBUtility; 3.17 import com.sun.corba.se.impl.orbutil.StackImpl;
4.1 --- a/src/share/classes/com/sun/corba/se/impl/interceptors/RequestInfoImpl.java Thu Apr 11 09:39:48 2013 -0700 4.2 +++ b/src/share/classes/com/sun/corba/se/impl/interceptors/RequestInfoImpl.java Mon Apr 08 23:12:03 2013 +0100 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 4.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.8 * 4.9 * This code is free software; you can redistribute it and/or modify it 4.10 @@ -86,13 +86,14 @@ 4.11 import com.sun.corba.se.impl.encoding.EncapsOutputStream; 4.12 4.13 import com.sun.corba.se.impl.orbutil.ORBUtility; 4.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader; 4.15 4.16 import com.sun.corba.se.impl.util.RepositoryId; 4.17 4.18 import com.sun.corba.se.impl.logging.InterceptorsSystemException; 4.19 import com.sun.corba.se.impl.logging.OMGSystemException; 4.20 4.21 +import sun.corba.SharedSecrets; 4.22 + 4.23 /** 4.24 * Implementation of the RequestInfo interface as specified in 4.25 * orbos/99-12-02 section 5.4.1. 4.26 @@ -452,7 +453,8 @@ 4.27 4.28 // Find the read method on the helper class: 4.29 String helperClassName = className + "Helper"; 4.30 - Class helperClass = ORBClassLoader.loadClass( helperClassName ); 4.31 + Class<?> helperClass = 4.32 + SharedSecrets.getJavaCorbaAccess().loadClass( helperClassName ); 4.33 Class[] readParams = new Class[1]; 4.34 readParams[0] = org.omg.CORBA.portable.InputStream.class; 4.35 Method readMethod = helperClass.getMethod( "read", readParams ); 4.36 @@ -512,7 +514,8 @@ 4.37 Class exceptionClass = userException.getClass(); 4.38 String className = exceptionClass.getName(); 4.39 String helperClassName = className + "Helper"; 4.40 - Class helperClass = ORBClassLoader.loadClass( helperClassName ); 4.41 + Class<?> helperClass = 4.42 + SharedSecrets.getJavaCorbaAccess().loadClass( helperClassName ); 4.43 4.44 // Find insert( Any, class ) method 4.45 Class[] insertMethodParams = new Class[2];
5.1 --- a/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java Thu Apr 11 09:39:48 2013 -0700 5.2 +++ b/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java Mon Apr 08 23:12:03 2013 +0100 5.3 @@ -1,5 +1,5 @@ 5.4 /* 5.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 5.6 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 5.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.8 * 5.9 * This code is free software; you can redistribute it and/or modify it 5.10 @@ -98,6 +98,14 @@ 5.11 public ValueHandlerImpl newValueHandlerImpl() { 5.12 return ValueHandlerImpl.getInstance(); 5.13 } 5.14 + public Class<?> loadClass(String className) throws ClassNotFoundException { 5.15 + if (Thread.currentThread().getContextClassLoader() != null) { 5.16 + return Thread.currentThread().getContextClassLoader(). 5.17 + loadClass(className); 5.18 + } else { 5.19 + return ClassLoader.getSystemClassLoader().loadClass(className); 5.20 + } 5.21 + } 5.22 }); 5.23 } 5.24
6.1 --- a/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java Thu Apr 11 09:39:48 2013 -0700 6.2 +++ b/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java Mon Apr 08 23:12:03 2013 +0100 6.3 @@ -1,5 +1,5 @@ 6.4 /* 6.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 6.6 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 6.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.8 * 6.9 * This code is free software; you can redistribute it and/or modify it 6.10 @@ -109,12 +109,9 @@ 6.11 import com.sun.corba.se.impl.util.Utility; 6.12 import com.sun.corba.se.impl.util.IdentityHashtable; 6.13 import com.sun.corba.se.impl.util.JDKBridge; 6.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader; 6.15 import com.sun.corba.se.impl.logging.UtilSystemException; 6.16 import com.sun.corba.se.spi.logging.CORBALogDomains; 6.17 import sun.corba.SharedSecrets; 6.18 -import sun.corba.JavaCorbaAccess; 6.19 - 6.20 6.21 /** 6.22 * Provides utility methods that can be used by stubs and ties to 6.23 @@ -263,7 +260,7 @@ 6.24 return new MarshalException(message,inner); 6.25 } else if (ex instanceof ACTIVITY_REQUIRED) { 6.26 try { 6.27 - Class cl = ORBClassLoader.loadClass( 6.28 + Class<?> cl = SharedSecrets.getJavaCorbaAccess().loadClass( 6.29 "javax.activity.ActivityRequiredException"); 6.30 Class[] params = new Class[2]; 6.31 params[0] = java.lang.String.class; 6.32 @@ -279,7 +276,7 @@ 6.33 } 6.34 } else if (ex instanceof ACTIVITY_COMPLETED) { 6.35 try { 6.36 - Class cl = ORBClassLoader.loadClass( 6.37 + Class<?> cl = SharedSecrets.getJavaCorbaAccess().loadClass( 6.38 "javax.activity.ActivityCompletedException"); 6.39 Class[] params = new Class[2]; 6.40 params[0] = java.lang.String.class; 6.41 @@ -295,7 +292,7 @@ 6.42 } 6.43 } else if (ex instanceof INVALID_ACTIVITY) { 6.44 try { 6.45 - Class cl = ORBClassLoader.loadClass( 6.46 + Class<?> cl = SharedSecrets.getJavaCorbaAccess().loadClass( 6.47 "javax.activity.InvalidActivityException"); 6.48 Class[] params = new Class[2]; 6.49 params[0] = java.lang.String.class;
7.1 --- a/src/share/classes/com/sun/corba/se/impl/orb/ORBDataParserImpl.java Thu Apr 11 09:39:48 2013 -0700 7.2 +++ b/src/share/classes/com/sun/corba/se/impl/orb/ORBDataParserImpl.java Mon Apr 08 23:12:03 2013 +0100 7.3 @@ -1,5 +1,5 @@ 7.4 /* 7.5 - * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved. 7.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 7.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 * 7.9 * This code is free software; you can redistribute it and/or modify it 7.10 @@ -48,7 +48,6 @@ 7.11 7.12 import com.sun.corba.se.impl.encoding.CodeSetComponentInfo ; 7.13 import com.sun.corba.se.impl.legacy.connection.USLPort; 7.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader ; 7.15 import com.sun.corba.se.impl.orbutil.ORBConstants ; 7.16 import com.sun.corba.se.impl.logging.ORBUtilSystemException ; 7.17
8.1 --- a/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java Thu Apr 11 09:39:48 2013 -0700 8.2 +++ b/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java Mon Apr 08 23:12:03 2013 +0100 8.3 @@ -1,5 +1,5 @@ 8.4 /* 8.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 8.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 8.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8.8 * 8.9 * This code is free software; you can redistribute it and/or modify it 8.10 @@ -152,7 +152,6 @@ 8.11 import com.sun.corba.se.impl.oa.poa.BadServerIdHandler; 8.12 import com.sun.corba.se.impl.oa.poa.DelegateImpl; 8.13 import com.sun.corba.se.impl.oa.poa.POAFactory; 8.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader; 8.15 import com.sun.corba.se.impl.orbutil.ORBConstants; 8.16 import com.sun.corba.se.impl.orbutil.ORBUtility; 8.17 import com.sun.corba.se.impl.orbutil.StackImpl;
9.1 --- a/src/share/classes/com/sun/corba/se/impl/orb/ParserTable.java Thu Apr 11 09:39:48 2013 -0700 9.2 +++ b/src/share/classes/com/sun/corba/se/impl/orb/ParserTable.java Mon Apr 08 23:12:03 2013 +0100 9.3 @@ -1,5 +1,5 @@ 9.4 /* 9.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 9.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 9.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.8 * 9.9 * This code is free software; you can redistribute it and/or modify it 9.10 @@ -78,7 +78,6 @@ 9.11 import com.sun.corba.se.impl.legacy.connection.USLPort ; 9.12 import com.sun.corba.se.impl.logging.ORBUtilSystemException ; 9.13 import com.sun.corba.se.impl.oa.poa.BadServerIdHandler ; 9.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader ; 9.15 import com.sun.corba.se.impl.orbutil.ORBConstants ; 9.16 import com.sun.corba.se.impl.protocol.giopmsgheaders.KeyAddr ; 9.17 import com.sun.corba.se.impl.protocol.giopmsgheaders.ProfileAddr ; 9.18 @@ -86,6 +85,8 @@ 9.19 import com.sun.corba.se.impl.transport.DefaultIORToSocketInfoImpl; 9.20 import com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl; 9.21 9.22 +import sun.corba.SharedSecrets; 9.23 + 9.24 /** Initialize the parser data for the standard ORB parser. This is used both 9.25 * to implement ORBDataParserImpl and to provide the basic testing framework 9.26 * for ORBDataParserImpl. 9.27 @@ -640,8 +641,8 @@ 9.28 String param = (String)value ; 9.29 9.30 try { 9.31 - Class legacySocketFactoryClass = 9.32 - ORBClassLoader.loadClass(param); 9.33 + Class<?> legacySocketFactoryClass = 9.34 + SharedSecrets.getJavaCorbaAccess().loadClass(param); 9.35 // For security reasons avoid creating an instance if 9.36 // this socket factory class is not one that would fail 9.37 // the class cast anyway. 9.38 @@ -670,7 +671,8 @@ 9.39 String param = (String)value ; 9.40 9.41 try { 9.42 - Class socketFactoryClass = ORBClassLoader.loadClass(param); 9.43 + Class<?> socketFactoryClass = 9.44 + SharedSecrets.getJavaCorbaAccess().loadClass(param); 9.45 // For security reasons avoid creating an instance if 9.46 // this socket factory class is not one that would fail 9.47 // the class cast anyway. 9.48 @@ -699,7 +701,8 @@ 9.49 String param = (String)value ; 9.50 9.51 try { 9.52 - Class iorToSocketInfoClass = ORBClassLoader.loadClass(param); 9.53 + Class<?> iorToSocketInfoClass = 9.54 + SharedSecrets.getJavaCorbaAccess().loadClass(param); 9.55 // For security reasons avoid creating an instance if 9.56 // this socket factory class is not one that would fail 9.57 // the class cast anyway. 9.58 @@ -728,7 +731,8 @@ 9.59 String param = (String)value ; 9.60 9.61 try { 9.62 - Class iiopPrimaryToContactInfoClass = ORBClassLoader.loadClass(param); 9.63 + Class<?> iiopPrimaryToContactInfoClass = 9.64 + SharedSecrets.getJavaCorbaAccess().loadClass(param); 9.65 // For security reasons avoid creating an instance if 9.66 // this socket factory class is not one that would fail 9.67 // the class cast anyway. 9.68 @@ -757,8 +761,8 @@ 9.69 String param = (String)value ; 9.70 9.71 try { 9.72 - Class contactInfoListFactoryClass = 9.73 - ORBClassLoader.loadClass(param); 9.74 + Class<?> contactInfoListFactoryClass = 9.75 + SharedSecrets.getJavaCorbaAccess().loadClass(param); 9.76 // For security reasons avoid creating an instance if 9.77 // this socket factory class is not one that would fail 9.78 // the class cast anyway.
10.1 --- a/src/share/classes/com/sun/corba/se/impl/orbutil/ORBClassLoader.java Thu Apr 11 09:39:48 2013 -0700 10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 10.3 @@ -1,47 +0,0 @@ 10.4 -/* 10.5 - * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved. 10.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.7 - * 10.8 - * This code is free software; you can redistribute it and/or modify it 10.9 - * under the terms of the GNU General Public License version 2 only, as 10.10 - * published by the Free Software Foundation. Oracle designates this 10.11 - * particular file as subject to the "Classpath" exception as provided 10.12 - * by Oracle in the LICENSE file that accompanied this code. 10.13 - * 10.14 - * This code is distributed in the hope that it will be useful, but WITHOUT 10.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10.16 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 10.17 - * version 2 for more details (a copy is included in the LICENSE file that 10.18 - * accompanied this code). 10.19 - * 10.20 - * You should have received a copy of the GNU General Public License version 10.21 - * 2 along with this work; if not, write to the Free Software Foundation, 10.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 10.23 - * 10.24 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 10.25 - * or visit www.oracle.com if you need additional information or have any 10.26 - * questions. 10.27 - */ 10.28 -package com.sun.corba.se.impl.orbutil; 10.29 - 10.30 -/** 10.31 - * Based on feedback from bug report 4452016, all class loading 10.32 - * in the ORB is isolated here. It is acceptable to use 10.33 - * Class.forName only when one is certain that the desired class 10.34 - * should come from the core JDK. 10.35 - */ 10.36 -public class ORBClassLoader 10.37 -{ 10.38 - public static Class loadClass(String className) 10.39 - throws ClassNotFoundException 10.40 - { 10.41 - return ORBClassLoader.getClassLoader().loadClass(className); 10.42 - } 10.43 - 10.44 - public static ClassLoader getClassLoader() { 10.45 - if (Thread.currentThread().getContextClassLoader() != null) 10.46 - return Thread.currentThread().getContextClassLoader(); 10.47 - else 10.48 - return ClassLoader.getSystemClassLoader(); 10.49 - } 10.50 -}
11.1 --- a/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java Thu Apr 11 09:39:48 2013 -0700 11.2 +++ b/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java Mon Apr 08 23:12:03 2013 +0100 11.3 @@ -1,5 +1,5 @@ 11.4 /* 11.5 - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 11.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 11.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.8 * 11.9 * This code is free software; you can redistribute it and/or modify it 11.10 @@ -90,6 +90,8 @@ 11.11 import com.sun.corba.se.impl.logging.OMGSystemException ; 11.12 import com.sun.corba.se.impl.ior.iiop.JavaSerializationComponent; 11.13 11.14 +import sun.corba.SharedSecrets; 11.15 + 11.16 /** 11.17 * Handy class full of static functions that don't belong in util.Utility for pure ORB reasons. 11.18 */ 11.19 @@ -262,8 +264,8 @@ 11.20 { 11.21 try { 11.22 String name = classNameOf(strm.read_string()); 11.23 - SystemException ex 11.24 - = (SystemException)ORBClassLoader.loadClass(name).newInstance(); 11.25 + SystemException ex = (SystemException)SharedSecrets. 11.26 + getJavaCorbaAccess().loadClass(name).newInstance(); 11.27 ex.minor = strm.read_long(); 11.28 ex.completed = CompletionStatus.from_int(strm.read_long()); 11.29 return ex;
12.1 --- a/src/share/classes/com/sun/corba/se/impl/protocol/giopmsgheaders/LocateReplyMessage_1_2.java Thu Apr 11 09:39:48 2013 -0700 12.2 +++ b/src/share/classes/com/sun/corba/se/impl/protocol/giopmsgheaders/LocateReplyMessage_1_2.java Mon Apr 08 23:12:03 2013 +0100 12.3 @@ -1,5 +1,5 @@ 12.4 /* 12.5 - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. 12.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 12.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 12.8 * 12.9 * This code is free software; you can redistribute it and/or modify it 12.10 @@ -41,7 +41,6 @@ 12.11 12.12 import com.sun.corba.se.impl.orbutil.ORBUtility; 12.13 import com.sun.corba.se.impl.orbutil.ORBConstants; 12.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader; 12.15 12.16 import com.sun.corba.se.spi.logging.CORBALogDomains ; 12.17 import com.sun.corba.se.impl.logging.ORBUtilSystemException ;
13.1 --- a/src/share/classes/com/sun/corba/se/impl/protocol/giopmsgheaders/MessageBase.java Thu Apr 11 09:39:48 2013 -0700 13.2 +++ b/src/share/classes/com/sun/corba/se/impl/protocol/giopmsgheaders/MessageBase.java Mon Apr 08 23:12:03 2013 +0100 13.3 @@ -1,5 +1,5 @@ 13.4 /* 13.5 - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. 13.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 13.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 13.8 * 13.9 * This code is free software; you can redistribute it and/or modify it 13.10 @@ -60,9 +60,10 @@ 13.11 import com.sun.corba.se.impl.logging.ORBUtilSystemException ; 13.12 import com.sun.corba.se.impl.orbutil.ORBUtility; 13.13 import com.sun.corba.se.impl.orbutil.ORBConstants; 13.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader; 13.15 import com.sun.corba.se.impl.protocol.AddressingDispositionException; 13.16 13.17 +import sun.corba.SharedSecrets; 13.18 + 13.19 /** 13.20 * This class acts as the base class for the various GIOP message types. This 13.21 * also serves as a factory to create various message types. We currently 13.22 @@ -909,7 +910,8 @@ 13.23 SystemException sysEx = null; 13.24 13.25 try { 13.26 - Class clazz = ORBClassLoader.loadClass(exClassName); 13.27 + Class<?> clazz = 13.28 + SharedSecrets.getJavaCorbaAccess().loadClass(exClassName); 13.29 if (message == null) { 13.30 sysEx = (SystemException) clazz.newInstance(); 13.31 } else {
14.1 --- a/src/share/classes/com/sun/corba/se/impl/protocol/giopmsgheaders/ReplyMessage_1_0.java Thu Apr 11 09:39:48 2013 -0700 14.2 +++ b/src/share/classes/com/sun/corba/se/impl/protocol/giopmsgheaders/ReplyMessage_1_0.java Mon Apr 08 23:12:03 2013 +0100 14.3 @@ -1,5 +1,5 @@ 14.4 /* 14.5 - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. 14.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 14.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 14.8 * 14.9 * This code is free software; you can redistribute it and/or modify it 14.10 @@ -37,7 +37,6 @@ 14.11 import com.sun.corba.se.spi.servicecontext.ServiceContexts; 14.12 import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 14.13 import com.sun.corba.se.impl.orbutil.ORBUtility; 14.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader; 14.15 import com.sun.corba.se.spi.ior.IOR; 14.16 import com.sun.corba.se.impl.encoding.CDRInputStream; 14.17
15.1 --- a/src/share/classes/com/sun/corba/se/impl/protocol/giopmsgheaders/ReplyMessage_1_1.java Thu Apr 11 09:39:48 2013 -0700 15.2 +++ b/src/share/classes/com/sun/corba/se/impl/protocol/giopmsgheaders/ReplyMessage_1_1.java Mon Apr 08 23:12:03 2013 +0100 15.3 @@ -1,5 +1,5 @@ 15.4 /* 15.5 - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. 15.6 + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 15.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 15.8 * 15.9 * This code is free software; you can redistribute it and/or modify it 15.10 @@ -37,7 +37,6 @@ 15.11 import com.sun.corba.se.spi.servicecontext.ServiceContexts; 15.12 import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 15.13 import com.sun.corba.se.impl.orbutil.ORBUtility; 15.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader; 15.15 import com.sun.corba.se.spi.ior.IOR; 15.16 import com.sun.corba.se.impl.encoding.CDRInputStream; 15.17
16.1 --- a/src/share/classes/com/sun/corba/se/spi/orb/ORB.java Thu Apr 11 09:39:48 2013 -0700 16.2 +++ b/src/share/classes/com/sun/corba/se/spi/orb/ORB.java Mon Apr 08 23:12:03 2013 +0100 16.3 @@ -1,5 +1,5 @@ 16.4 /* 16.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 16.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 16.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 16.8 * 16.9 * This code is free software; you can redistribute it and/or modify it 16.10 @@ -97,8 +97,8 @@ 16.11 16.12 import com.sun.corba.se.impl.presentation.rmi.PresentationManagerImpl ; 16.13 16.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader ; 16.15 import sun.awt.AppContext; 16.16 +import sun.corba.SharedSecrets; 16.17 16.18 public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB 16.19 implements Broker, TypeCodeFactory 16.20 @@ -201,7 +201,7 @@ 16.21 16.22 try { 16.23 // First try the configured class name, if any 16.24 - Class cls = ORBClassLoader.loadClass( className ) ; 16.25 + Class<?> cls = SharedSecrets.getJavaCorbaAccess().loadClass( className ) ; 16.26 sff = (PresentationManager.StubFactoryFactory)cls.newInstance() ; 16.27 } catch (Exception exc) { 16.28 // Use the default. Log the error as a warning.
17.1 --- a/src/share/classes/com/sun/corba/se/spi/orb/OperationFactory.java Thu Apr 11 09:39:48 2013 -0700 17.2 +++ b/src/share/classes/com/sun/corba/se/spi/orb/OperationFactory.java Mon Apr 08 23:12:03 2013 +0100 17.3 @@ -1,5 +1,5 @@ 17.4 /* 17.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 17.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 17.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.8 * 17.9 * This code is free software; you can redistribute it and/or modify it 17.10 @@ -35,9 +35,10 @@ 17.11 import com.sun.corba.se.spi.logging.CORBALogDomains ; 17.12 17.13 import com.sun.corba.se.impl.logging.ORBUtilSystemException ; 17.14 -import com.sun.corba.se.impl.orbutil.ORBClassLoader ; 17.15 import com.sun.corba.se.impl.orbutil.ObjectUtility ; 17.16 17.17 +import sun.corba.SharedSecrets; 17.18 + 17.19 /** This is a static factory class for commonly used operations 17.20 * for property parsing. The following operations are supported: 17.21 * <ul> 17.22 @@ -247,7 +248,8 @@ 17.23 String className = getString( value ) ; 17.24 17.25 try { 17.26 - Class result = ORBClassLoader.loadClass( className ) ; 17.27 + Class<?> result = 17.28 + SharedSecrets.getJavaCorbaAccess().loadClass( className ) ; 17.29 return result ; 17.30 } catch (Exception exc) { 17.31 ORBUtilSystemException wrapper = ORBUtilSystemException.get(
18.1 --- a/src/share/classes/sun/corba/JavaCorbaAccess.java Thu Apr 11 09:39:48 2013 -0700 18.2 +++ b/src/share/classes/sun/corba/JavaCorbaAccess.java Mon Apr 08 23:12:03 2013 +0100 18.3 @@ -1,5 +1,5 @@ 18.4 /* 18.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 18.6 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 18.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 18.8 * 18.9 * This code is free software; you can redistribute it and/or modify it 18.10 @@ -29,4 +29,5 @@ 18.11 18.12 public interface JavaCorbaAccess { 18.13 public ValueHandlerImpl newValueHandlerImpl(); 18.14 + public Class<?> loadClass(String className) throws ClassNotFoundException; 18.15 }