harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r490750 - /harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassLoaderTest.java
Date Thu, 28 Dec 2006 16:15:18 GMT
Author: gshimansky
Date: Thu Dec 28 08:15:18 2006
New Revision: 490750

URL: http://svn.apache.org/viewvc?view=rev&rev=490750
Log:
Applied HARMONY-885 [classlib][core][drlvm] unexpected LinkageError for ClassLoader.defineClass

Added a test from a bug which is no longer reproducible. The test should be here for regression
checking


Modified:
    harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassLoaderTest.java

Modified: harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassLoaderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassLoaderTest.java?view=diff&rev=490750&r1=490749&r2=490750
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassLoaderTest.java (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassLoaderTest.java Thu Dec 28
08:15:18 2006
@@ -2228,4 +2228,24 @@
         }
         assertTrue("NullPointerException expected (case 2)", et);
     }
+    /*
+     * Regression test for HARMONY-885
+     * [classlib][core][drlvm] unexpected LinkageError for ClassLoader.defineClass
+     *
+     */
+    public void test_HARMONY_885() {
+        try { 
+            byte[] array0 = new byte[] { 2, 2, 2, 2, 2, 2}; 
+            new CL().defineKlass(array0, 0, 3); 
+            fail("exception expected"); 
+        } catch (ClassFormatError e) { 
+            //expected 
+        } 
+    }
+    private class CL extends ClassLoader { 
+        public Class defineKlass(byte[] a, int i1, int i2) throws ClassFormatError { 
+            return super.defineClass(a, i1, i2); 
+        } 
+    } 
+
 }



Mime
View raw message