Fri, 18 Apr 2014 22:32:34 -0700
Merge
1.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java Tue Apr 15 12:06:47 2014 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java Fri Apr 18 22:32:34 2014 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2013, 2014, 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 @@ -31,6 +31,8 @@ 1.11 import java.lang.reflect.InvocationTargetException; 1.12 import java.lang.reflect.Method; 1.13 import java.lang.reflect.Type; 1.14 +import java.security.AccessController; 1.15 +import java.security.PrivilegedAction; 1.16 import java.util.logging.Level; 1.17 import java.util.logging.Logger; 1.18 1.19 @@ -38,22 +40,32 @@ 1.20 * Utils class. 1.21 * Has *package private* access to avoid inappropriate usage. 1.22 */ 1.23 -/* package */ final class Utils { 1.24 +final class Utils { 1.25 1.26 private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); 1.27 1.28 /** 1.29 * static ReflectionNavigator field to avoid usage of reflection every time we use it. 1.30 */ 1.31 - /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 1.32 + static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 1.33 1.34 static { // we statically initializing REFLECTION_NAVIGATOR property 1.35 - Class refNav = null; 1.36 try { 1.37 - refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 1.38 + Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 1.39 //noinspection unchecked 1.40 - Method getInstance = refNav.getDeclaredMethod("getInstance"); 1.41 - getInstance.setAccessible(true); 1.42 + final Method getInstance = refNav.getDeclaredMethod("getInstance"); 1.43 + 1.44 + // requires accessClassInPackage privilege 1.45 + AccessController.doPrivileged( 1.46 + new PrivilegedAction<Object>() { 1.47 + @Override 1.48 + public Object run() { 1.49 + getInstance.setAccessible(true); 1.50 + return null; 1.51 + } 1.52 + } 1.53 + ); 1.54 + 1.55 //noinspection unchecked 1.56 REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); 1.57 } catch (ClassNotFoundException e) {
2.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java Tue Apr 15 12:06:47 2014 -0700 2.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java Fri Apr 18 22:32:34 2014 -0700 2.3 @@ -1,5 +1,5 @@ 2.4 /* 2.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 2.6 + * Copyright (c) 2013, 2014, 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 @@ -31,6 +31,8 @@ 2.11 import java.lang.reflect.InvocationTargetException; 2.12 import java.lang.reflect.Method; 2.13 import java.lang.reflect.Type; 2.14 +import java.security.AccessController; 2.15 +import java.security.PrivilegedAction; 2.16 import java.util.logging.Level; 2.17 import java.util.logging.Logger; 2.18 2.19 @@ -38,22 +40,32 @@ 2.20 * Utils class. 2.21 * Has *package private* access to avoid inappropriate usage. 2.22 */ 2.23 -/* package */ final class Utils { 2.24 +final class Utils { 2.25 2.26 private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); 2.27 2.28 /** 2.29 * static ReflectionNavigator field to avoid usage of reflection every time we use it. 2.30 */ 2.31 - /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 2.32 + static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 2.33 2.34 static { // we statically initializing REFLECTION_NAVIGATOR property 2.35 - Class refNav = null; 2.36 try { 2.37 - refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 2.38 + Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 2.39 //noinspection unchecked 2.40 - Method getInstance = refNav.getDeclaredMethod("getInstance"); 2.41 - getInstance.setAccessible(true); 2.42 + final Method getInstance = refNav.getDeclaredMethod("getInstance"); 2.43 + 2.44 + // requires accessClassInPackage privilege 2.45 + AccessController.doPrivileged( 2.46 + new PrivilegedAction<Object>() { 2.47 + @Override 2.48 + public Object run() { 2.49 + getInstance.setAccessible(true); 2.50 + return null; 2.51 + } 2.52 + } 2.53 + ); 2.54 + 2.55 //noinspection unchecked 2.56 REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); 2.57 } catch (ClassNotFoundException e) {
3.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java Tue Apr 15 12:06:47 2014 -0700 3.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java Fri Apr 18 22:32:34 2014 -0700 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 2013, 2014, 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 @@ -31,6 +31,8 @@ 3.11 import java.lang.reflect.InvocationTargetException; 3.12 import java.lang.reflect.Method; 3.13 import java.lang.reflect.Type; 3.14 +import java.security.AccessController; 3.15 +import java.security.PrivilegedAction; 3.16 import java.util.logging.Level; 3.17 import java.util.logging.Logger; 3.18 3.19 @@ -38,22 +40,32 @@ 3.20 * Utils class. 3.21 * Has *package private* access to avoid inappropriate usage. 3.22 */ 3.23 -/* package */ final class Utils { 3.24 +final class Utils { 3.25 3.26 private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); 3.27 3.28 /** 3.29 * static ReflectionNavigator field to avoid usage of reflection every time we use it. 3.30 */ 3.31 - /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 3.32 + static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 3.33 3.34 static { // we statically initializing REFLECTION_NAVIGATOR property 3.35 - Class refNav = null; 3.36 try { 3.37 - refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 3.38 + Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 3.39 //noinspection unchecked 3.40 - Method getInstance = refNav.getDeclaredMethod("getInstance"); 3.41 - getInstance.setAccessible(true); 3.42 + final Method getInstance = refNav.getDeclaredMethod("getInstance"); 3.43 + 3.44 + // requires accessClassInPackage privilege 3.45 + AccessController.doPrivileged( 3.46 + new PrivilegedAction<Object>() { 3.47 + @Override 3.48 + public Object run() { 3.49 + getInstance.setAccessible(true); 3.50 + return null; 3.51 + } 3.52 + } 3.53 + ); 3.54 + 3.55 //noinspection unchecked 3.56 REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); 3.57 } catch (ClassNotFoundException e) {
4.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java Tue Apr 15 12:06:47 2014 -0700 4.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java Fri Apr 18 22:32:34 2014 -0700 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 2013, 2014, 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 @@ -31,6 +31,8 @@ 4.11 import java.lang.reflect.InvocationTargetException; 4.12 import java.lang.reflect.Method; 4.13 import java.lang.reflect.Type; 4.14 +import java.security.AccessController; 4.15 +import java.security.PrivilegedAction; 4.16 import java.util.logging.Level; 4.17 import java.util.logging.Logger; 4.18 4.19 @@ -38,22 +40,32 @@ 4.20 * Utils class. 4.21 * Has *package private* access to avoid inappropriate usage. 4.22 */ 4.23 -/* package */ final class Utils { 4.24 +final class Utils { 4.25 4.26 private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); 4.27 4.28 /** 4.29 * static ReflectionNavigator field to avoid usage of reflection every time we use it. 4.30 */ 4.31 - /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 4.32 + static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 4.33 4.34 static { // we statically initializing REFLECTION_NAVIGATOR property 4.35 - Class refNav = null; 4.36 try { 4.37 - refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 4.38 + Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 4.39 //noinspection unchecked 4.40 - Method getInstance = refNav.getDeclaredMethod("getInstance"); 4.41 - getInstance.setAccessible(true); 4.42 + final Method getInstance = refNav.getDeclaredMethod("getInstance"); 4.43 + 4.44 + // requires accessClassInPackage privilege 4.45 + AccessController.doPrivileged( 4.46 + new PrivilegedAction<Object>() { 4.47 + @Override 4.48 + public Object run() { 4.49 + getInstance.setAccessible(true); 4.50 + return null; 4.51 + } 4.52 + } 4.53 + ); 4.54 + 4.55 //noinspection unchecked 4.56 REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); 4.57 } catch (ClassNotFoundException e) {
5.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java Tue Apr 15 12:06:47 2014 -0700 5.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java Fri Apr 18 22:32:34 2014 -0700 5.3 @@ -1,5 +1,5 @@ 5.4 /* 5.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 5.6 + * Copyright (c) 2013, 2014, 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 @@ -31,6 +31,8 @@ 5.11 import java.lang.reflect.InvocationTargetException; 5.12 import java.lang.reflect.Method; 5.13 import java.lang.reflect.Type; 5.14 +import java.security.AccessController; 5.15 +import java.security.PrivilegedAction; 5.16 import java.util.logging.Level; 5.17 import java.util.logging.Logger; 5.18 5.19 @@ -38,22 +40,32 @@ 5.20 * Utils class. 5.21 * Has *package private* access to avoid inappropriate usage. 5.22 */ 5.23 -/* package */ final class Utils { 5.24 +final class Utils { 5.25 5.26 private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); 5.27 5.28 /** 5.29 * static ReflectionNavigator field to avoid usage of reflection every time we use it. 5.30 */ 5.31 - /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 5.32 + static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 5.33 5.34 static { // we statically initializing REFLECTION_NAVIGATOR property 5.35 - Class refNav = null; 5.36 try { 5.37 - refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 5.38 + Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 5.39 //noinspection unchecked 5.40 - Method getInstance = refNav.getDeclaredMethod("getInstance"); 5.41 - getInstance.setAccessible(true); 5.42 + final Method getInstance = refNav.getDeclaredMethod("getInstance"); 5.43 + 5.44 + // requires accessClassInPackage privilege 5.45 + AccessController.doPrivileged( 5.46 + new PrivilegedAction<Object>() { 5.47 + @Override 5.48 + public Object run() { 5.49 + getInstance.setAccessible(true); 5.50 + return null; 5.51 + } 5.52 + } 5.53 + ); 5.54 + 5.55 //noinspection unchecked 5.56 REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); 5.57 } catch (ClassNotFoundException e) {
6.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java Tue Apr 15 12:06:47 2014 -0700 6.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java Fri Apr 18 22:32:34 2014 -0700 6.3 @@ -1,5 +1,5 @@ 6.4 /* 6.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 6.6 + * Copyright (c) 2013, 2014, 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 @@ -31,6 +31,8 @@ 6.11 import java.lang.reflect.InvocationTargetException; 6.12 import java.lang.reflect.Method; 6.13 import java.lang.reflect.Type; 6.14 +import java.security.AccessController; 6.15 +import java.security.PrivilegedAction; 6.16 import java.util.logging.Level; 6.17 import java.util.logging.Logger; 6.18 6.19 @@ -38,22 +40,32 @@ 6.20 * Utils class. 6.21 * Has *package private* access to avoid inappropriate usage. 6.22 */ 6.23 -/* package */ final class Utils { 6.24 +final class Utils { 6.25 6.26 private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); 6.27 6.28 /** 6.29 * static ReflectionNavigator field to avoid usage of reflection every time we use it. 6.30 */ 6.31 - /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 6.32 + static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 6.33 6.34 static { // we statically initializing REFLECTION_NAVIGATOR property 6.35 - Class refNav = null; 6.36 try { 6.37 - refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 6.38 + Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 6.39 //noinspection unchecked 6.40 - Method getInstance = refNav.getDeclaredMethod("getInstance"); 6.41 - getInstance.setAccessible(true); 6.42 + final Method getInstance = refNav.getDeclaredMethod("getInstance"); 6.43 + 6.44 + // requires accessClassInPackage privilege 6.45 + AccessController.doPrivileged( 6.46 + new PrivilegedAction<Object>() { 6.47 + @Override 6.48 + public Object run() { 6.49 + getInstance.setAccessible(true); 6.50 + return null; 6.51 + } 6.52 + } 6.53 + ); 6.54 + 6.55 //noinspection unchecked 6.56 REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); 6.57 } catch (ClassNotFoundException e) {
7.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java Tue Apr 15 12:06:47 2014 -0700 7.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java Fri Apr 18 22:32:34 2014 -0700 7.3 @@ -1,5 +1,5 @@ 7.4 /* 7.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 7.6 + * Copyright (c) 2013, 2014, 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 @@ -31,6 +31,8 @@ 7.11 import java.lang.reflect.InvocationTargetException; 7.12 import java.lang.reflect.Method; 7.13 import java.lang.reflect.Type; 7.14 +import java.security.AccessController; 7.15 +import java.security.PrivilegedAction; 7.16 import java.util.logging.Level; 7.17 import java.util.logging.Logger; 7.18 7.19 @@ -41,22 +43,32 @@ 7.20 * 7.21 * Has *package private* access to avoid inappropriate usage. 7.22 */ 7.23 -/* package */ final class Utils { 7.24 +final class Utils { 7.25 7.26 private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); 7.27 7.28 /** 7.29 * static ReflectionNavigator field to avoid usage of reflection every time we use it. 7.30 */ 7.31 - /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 7.32 + static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 7.33 7.34 static { // we statically initializing REFLECTION_NAVIGATOR property 7.35 - Class refNav = null; 7.36 try { 7.37 - refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 7.38 + Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 7.39 //noinspection unchecked 7.40 - Method getInstance = refNav.getDeclaredMethod("getInstance"); 7.41 - getInstance.setAccessible(true); 7.42 + final Method getInstance = refNav.getDeclaredMethod("getInstance"); 7.43 + 7.44 + // requires accessClassInPackage privilege 7.45 + AccessController.doPrivileged( 7.46 + new PrivilegedAction<Object>() { 7.47 + @Override 7.48 + public Object run() { 7.49 + getInstance.setAccessible(true); 7.50 + return null; 7.51 + } 7.52 + } 7.53 + ); 7.54 + 7.55 //noinspection unchecked 7.56 REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); 7.57 } catch (ClassNotFoundException e) {
8.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java Tue Apr 15 12:06:47 2014 -0700 8.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java Fri Apr 18 22:32:34 2014 -0700 8.3 @@ -1,5 +1,5 @@ 8.4 /* 8.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 8.6 + * Copyright (c) 2013, 2014, 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 @@ -31,6 +31,8 @@ 8.11 import java.lang.reflect.InvocationTargetException; 8.12 import java.lang.reflect.Method; 8.13 import java.lang.reflect.Type; 8.14 +import java.security.AccessController; 8.15 +import java.security.PrivilegedAction; 8.16 import java.util.logging.Level; 8.17 import java.util.logging.Logger; 8.18 8.19 @@ -41,22 +43,32 @@ 8.20 * 8.21 * Has *package private* access to avoid inappropriate usage. 8.22 */ 8.23 -/* package */ final class Utils { 8.24 +final class Utils { 8.25 8.26 private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); 8.27 8.28 /** 8.29 * static ReflectionNavigator field to avoid usage of reflection every time we use it. 8.30 */ 8.31 - /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 8.32 + static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 8.33 8.34 static { // we statically initializing REFLECTION_NAVIGATOR property 8.35 - Class refNav = null; 8.36 try { 8.37 - refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 8.38 + Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 8.39 //noinspection unchecked 8.40 - Method getInstance = refNav.getDeclaredMethod("getInstance"); 8.41 - getInstance.setAccessible(true); 8.42 + final Method getInstance = refNav.getDeclaredMethod("getInstance"); 8.43 + 8.44 + // requires accessClassInPackage privilege 8.45 + AccessController.doPrivileged( 8.46 + new PrivilegedAction<Object>() { 8.47 + @Override 8.48 + public Object run() { 8.49 + getInstance.setAccessible(true); 8.50 + return null; 8.51 + } 8.52 + } 8.53 + ); 8.54 + 8.55 //noinspection unchecked 8.56 REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); 8.57 } catch (ClassNotFoundException e) {