diff -r 6508d71adfd1 -r da93d0c0f2f2 jdk/src/share/classes/sun/tracing/ProviderSkeleton.java --- a/jdk/src/share/classes/sun/tracing/ProviderSkeleton.java Wed Nov 18 11:15:12 2009 -0800 +++ b/jdk/src/share/classes/sun/tracing/ProviderSkeleton.java Wed Nov 18 22:29:16 2009 -0800 @@ -32,6 +32,8 @@ import java.lang.reflect.AnnotatedElement; import java.lang.annotation.Annotation; import java.util.HashMap; +import java.security.AccessController; +import java.security.PrivilegedAction; import com.sun.tracing.Provider; import com.sun.tracing.Probe; @@ -99,7 +101,13 @@ * It is up to the factory implementations to call this after construction. */ public void init() { - for (Method m : providerType.getDeclaredMethods()) { + Method[] methods = AccessController.doPrivileged(new PrivilegedAction() { + public Method[] run() { + return providerType.getDeclaredMethods(); + } + }); + + for (Method m : methods) { if ( m.getReturnType() != Void.TYPE ) { throw new IllegalArgumentException( "Return value of method is not void");