Tue, 20 May 2014 12:02:58 -0700
Merge
.hgtags | file | annotate | diff | comparison | revisions |
1.1 --- a/.hgtags Tue May 13 23:18:08 2014 -0700 1.2 +++ b/.hgtags Tue May 20 12:02:58 2014 -0700 1.3 @@ -260,6 +260,7 @@ 1.4 384ccf4e14cb90c89570e16a5f4ca440a69d6d93 jdk8u5-b02 1.5 e423a4f2ec72ea0e24bea0fa77dd105095bbee67 jdk8u5-b03 1.6 738b966ee0b00d994445d34eb7eb087bd41a5478 jdk8u5-b04 1.7 +3960c6ef7bd1782d6357c510dab393d291164045 jdk8u11-b00 1.8 3960c6ef7bd1782d6357c510dab393d291164045 jdk8u5-b05 1.9 0543f4dddddc67b142b4706b2d403a654809e605 jdk8u5-b06 1.10 0eb7f9f88e93587ace50614385f85afd221f5cb1 jdk8u5-b07 1.11 @@ -269,6 +270,15 @@ 1.12 75fd3933daaf5826e7c03bfb318026ac8a4c07ef jdk8u5-b11 1.13 e2454d30b525bcb6ebcc711bd2928fbd29c11143 jdk8u5-b12 1.14 d2200a87d5ad6a9d06d9df144376ea5511b3916b jdk8u5-b13 1.15 +d2732c66f0f927d7f31dead4cce1a0612b9ff2a1 jdk8u11-b01 1.16 +152cc523baf1fdfe48514e3fe0d8e5a9b3c01ba4 jdk8u11-b02 1.17 +c2c073f04f0566c868fec49b96e5885ad69f065c jdk8u11-b03 1.18 +d1dbc7bc54291d447fce5655e0878b8689ad25b7 jdk8u11-b04 1.19 +9626907d2521220a0214129733088bad35656239 jdk8u11-b05 1.20 +6b71476418c1f6a085fb10460dcfedc5346e69af jdk8u11-b06 1.21 +c29ede8e947c365ce55174eba716050c48461576 jdk8u11-b07 1.22 +ca91f03660789a75710b4a081cd32aab00e80964 jdk8u11-b08 1.23 +6e994ba1e4610b367f292a41a0d2c77091f93ab6 jdk8u11-b09 1.24 ba061957b8bdb5f04e58154b27405fbf6fe3c71f jdk8u20-b02 1.25 337a3a4086235e926e1d684bf4d0b2add70d6f55 jdk8u20-b03 1.26 579caba2483ee3c9e32d87b31ab46e86f1aa9cd3 jdk8u20-b04
2.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java Tue May 13 23:18:08 2014 -0700 2.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java Tue May 20 12:02:58 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/api/Utils.java Tue May 13 23:18:08 2014 -0700 3.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java Tue May 20 12:02:58 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/model/impl/Utils.java Tue May 13 23:18:08 2014 -0700 4.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java Tue May 20 12:02:58 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/Utils.java Tue May 13 23:18:08 2014 -0700 5.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java Tue May 20 12:02:58 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/property/Utils.java Tue May 13 23:18:08 2014 -0700 6.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java Tue May 20 12:02:58 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/bind/v2/runtime/reflect/Utils.java Tue May 13 23:18:08 2014 -0700 7.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java Tue May 20 12:02:58 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 @@ -38,22 +40,32 @@ 7.20 * Utils class. 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/model/Utils.java Tue May 13 23:18:08 2014 -0700 8.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java Tue May 20 12:02:58 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) {
9.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java Tue May 13 23:18:08 2014 -0700 9.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java Tue May 20 12:02:58 2014 -0700 9.3 @@ -1,5 +1,5 @@ 9.4 /* 9.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 9.6 + * Copyright (c) 2013, 2014, 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 @@ -31,6 +31,8 @@ 9.11 import java.lang.reflect.InvocationTargetException; 9.12 import java.lang.reflect.Method; 9.13 import java.lang.reflect.Type; 9.14 +import java.security.AccessController; 9.15 +import java.security.PrivilegedAction; 9.16 import java.util.logging.Level; 9.17 import java.util.logging.Logger; 9.18 9.19 @@ -41,22 +43,32 @@ 9.20 * 9.21 * Has *package private* access to avoid inappropriate usage. 9.22 */ 9.23 -/* package */ final class Utils { 9.24 +final class Utils { 9.25 9.26 private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); 9.27 9.28 /** 9.29 * static ReflectionNavigator field to avoid usage of reflection every time we use it. 9.30 */ 9.31 - /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 9.32 + static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; 9.33 9.34 static { // we statically initializing REFLECTION_NAVIGATOR property 9.35 - Class refNav = null; 9.36 try { 9.37 - refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 9.38 + Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); 9.39 //noinspection unchecked 9.40 - Method getInstance = refNav.getDeclaredMethod("getInstance"); 9.41 - getInstance.setAccessible(true); 9.42 + final Method getInstance = refNav.getDeclaredMethod("getInstance"); 9.43 + 9.44 + // requires accessClassInPackage privilege 9.45 + AccessController.doPrivileged( 9.46 + new PrivilegedAction<Object>() { 9.47 + @Override 9.48 + public Object run() { 9.49 + getInstance.setAccessible(true); 9.50 + return null; 9.51 + } 9.52 + } 9.53 + ); 9.54 + 9.55 //noinspection unchecked 9.56 REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); 9.57 } catch (ClassNotFoundException e) {