[Patch] Review request - bug 7147060 com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java doesn't run in agentvm mode (original) (raw)

Eric Wang yiming.wang at oracle.com
Thu Jul 5 08🔞37 UTC 2012


Hi David & Stuart,

Can you please help to review the fix for the bug 7147060 <http://monaco.us.oracle.com/detail.jsf?cr=7147060>, Thanks you!

The test reports ClassNotFoundException which is caused by below reasons:

  1. Class can be found in "test.classes" instead of "test.src".
  2. In agentvm mode, the MyTransform.class is loaded by the child of the context ClassLoader of current thread, however, The method Transform.register(String, String) tries to use context ClassLoader to load class MyTransform.class which is not found.

The proposed fix is:

  1. Replace "test.src" to "test.classes".
  2. Replace the current thread ClassLoader to its child.

Regards, Eric -------------- next part -------------- --- old/test/ProblemList.txt 2012-07-05 15:57:49.477164126 +0800 +++ new/test/ProblemList.txt 2012-07-05 15:57:45.177070426 +0800 @@ -290,9 +290,6 @@ # 7177556 com/sun/crypto/provider/KeyFactory/TestProviderLeak.java generic-all -# 7147060 -com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java generic-all

Failing on Solaris i586, 3/9/2010, not a -samevm issue (jdk_security3)

sun/security/pkcs11/Secmod/AddPrivateKey.java solaris-i586 sun/security/pkcs11/ec/ReadCertificates.java generic-all -------------- next part -------------- --- old/test/com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java 2012-07-05 15:57:56.799140287 +0800 +++ new/test/com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java 2012-07-05 15:57:54.790043435 +0800 @@ -39,7 +39,7 @@

public class ClassLoaderTest {

@@ -50,15 +50,26 @@ URLClassLoader ucl = new URLClassLoader(urls); Class c = ucl.loadClass("MyTransform"); Constructor cons = c.getConstructor();



More information about the core-libs-dev mailing list