changeset 900:19119229b5c0

8028215: ORB.init fails with SecurityException if properties select the JDK default ORB Summary: check for default ORBImpl and ORBSingleton set via properties or System properties Reviewed-by: alanb, coffeys, mchung
author msheppar
date Wed, 27 Nov 2013 11:20:30 +0000
parents a531112cc6d0
children d81370c5b863
files src/share/classes/org/omg/CORBA/ORB.java
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/org/omg/CORBA/ORB.java	Mon Nov 11 15:52:11 2013 +0000
+++ b/src/share/classes/org/omg/CORBA/ORB.java	Wed Nov 27 11:20:30 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -285,7 +285,8 @@
             String className = getSystemProperty(ORBSingletonClassKey);
             if (className == null)
                 className = getPropertyFromFile(ORBSingletonClassKey);
-            if (className == null) {
+            if ((className == null) ||
+                    (className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) {
                 singleton = new com.sun.corba.se.impl.orb.ORBSingleton();
             } else {
                 singleton = create_impl(className);
@@ -339,7 +340,8 @@
             className = getSystemProperty(ORBClassKey);
         if (className == null)
             className = getPropertyFromFile(ORBClassKey);
-        if (className == null) {
+        if ((className == null) ||
+                    (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) {
             orb = new com.sun.corba.se.impl.orb.ORBImpl();
         } else {
             orb = create_impl(className);
@@ -369,7 +371,8 @@
             className = getSystemProperty(ORBClassKey);
         if (className == null)
             className = getPropertyFromFile(ORBClassKey);
-        if (className == null) {
+        if ((className == null) ||
+                    (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) {
             orb = new com.sun.corba.se.impl.orb.ORBImpl();
         } else {
             orb = create_impl(className);