Review Request: 8073361: Missing doPrivileged in com.sun.xml.internal.bind.v2.ClassFactory

Mandy Chung mandy.chung at oracle.com
Fri Feb 20 18:54:55 UTC 2015


This fixes a regression due to JDK-8057645 moving JAXB to ext loader
that was tested before the fix for JDK-8054367 went in jdk9.  This
was uncovered after JDK-8057645and JDK-8054367 met.

The fix is simple.  Class.getDeclaredConstructor on a class defined
by the null loader will require RuntimePermission("accessDeclaredMembers")
check that needs to be wrapped with doPrivileged block.

http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8073361/webrev.00/

It doesn't change the behavior as previously when JAXB was loaded
by the null class loader that it always has access to any declared
member of any class (it's the ancestor of all class loaders).

Mandy
[1] http://hg.openjdk.java.net/jdk9/jdk9/jaxws/rev/ef93f7aa0d2f



More information about the core-libs-dev mailing list