harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r508067 - in /harmony/enhanced/drlvm/trunk: src/test/regression/H3048/ src/test/regression/H3048/H3048.java src/test/regression/H3048/run.test.xml vm/vmcore/src/class_support/Initialize.cpp
Date Thu, 15 Feb 2007 18:38:08 GMT
Author: gshimansky
Date: Thu Feb 15 10:38:08 2007
New Revision: 508067

URL: http://svn.apache.org/viewvc?view=rev&rev=508067
Log:
Applied HARMONY-3048 [drlvm][classloader] Assertion !exn_raised() fails in <clinit>
method invocation

Patch also contains regression test.

Tests passed on Ubuntu6 x86, Windows XP x86, SuSE x86_64 and SuSE9 IPF


Added:
    harmony/enhanced/drlvm/trunk/src/test/regression/H3048/
    harmony/enhanced/drlvm/trunk/src/test/regression/H3048/H3048.java   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H3048/run.test.xml   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Initialize.cpp

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H3048/H3048.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H3048/H3048.java?view=auto&rev=508067
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H3048/H3048.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H3048/H3048.java Thu Feb 15 10:38:08
2007
@@ -0,0 +1,32 @@
+package org.apache.harmony.drlvm.tests.regression.h3048;
+
+import junit.framework.TestCase;
+
+public class H3048 extends TestCase {
+    public void test() {
+        boolean passed = false;
+        try {
+            new MyTest();
+        } catch (NoClassDefFoundError e) {
+            passed = true;
+        }
+        assertTrue(passed);
+    }
+}
+
+class MyTest extends MyTestSuper {
+    static {
+        System.out.println("MyTest.<clinit>");
+    }
+}
+
+class MyTestSuper {
+    static {
+        try {
+            throw new MyException();
+        } catch(Exception e) {
+        }
+    }
+}
+
+class MyException extends Exception {}

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H3048/H3048.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H3048/run.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H3048/run.test.xml?view=auto&rev=508067
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H3048/run.test.xml (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H3048/run.test.xml Thu Feb 15 10:38:08
2007
@@ -0,0 +1,11 @@
+<project name="RUN HARMONY-3048 Regression Test">
+    <target name="run-test">
+        <!-- extend JUnit test launcher to run JNI test -->
+        <delete
+             file="${reg.test.class.path}/org/apache/harmony/drlvm/tests/regression/h3048/MyException.class"
+             verbose="true"/>
+        <run-junit-test 
+             test="org.apache.harmony.drlvm.tests.regression.h3048.H3048" />
+    </target>
+</project>
+

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H3048/run.test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Initialize.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Initialize.cpp?view=diff&rev=508067&r1=508066&r2=508067
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Initialize.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Initialize.cpp Thu Feb 15 10:38:08
2007
@@ -101,7 +101,7 @@
     if(has_super_class()) {
         class_initialize_ex(get_super_class());
 
-        if(get_super_class()->in_error()) { 
+        if(exn_raised()) { 
             jthread_monitor_enter(jlc);
             m_initializing_thread = NULL;
             lock();



Mime
View raw message