harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject svn commit: r651313 - /harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/reflect/MethodTest.java
Date Thu, 24 Apr 2008 16:44:08 GMT
Author: vmz
Date: Thu Apr 24 09:43:59 2008
New Revision: 651313

URL: http://svn.apache.org/viewvc?rev=651313&view=rev
Log:
HARMONY-5622 [drlvm][kernel][geronimo] Method.getGeneric*() methods throw NPE for parametrized
interface methods
HARMONY-5790 [drlvm][interpreter] Stack size is not enough
Separated java.lang.reflect.MethodTest.test_getGeneric() test case in two, so that one is
run in a main thread, and another in a separate thread, thus we make sure VM provides enough
stack in both cases.
These two test cases are now work as regression tests for both HARMONY-5622 and HARMONY-5790.
As these tests sometimes fail on interpreter, they're commented out for now, until HARMONY-5790
is properly resolved.

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

Modified: harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/reflect/MethodTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/reflect/MethodTest.java?rev=651313&r1=651312&r2=651313&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/reflect/MethodTest.java (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/reflect/MethodTest.java Thu Apr
24 09:43:59 2008
@@ -333,19 +333,45 @@
         }
     }
 
-    interface GenericSample {
-        public <T extends GenericSample, E extends Throwable> T test(T param) throws
E;
+    /*
+     * Commented out until HARMONY-5790 is properly resolved
+     *
+    interface GenericSample1 {
+        public <T extends GenericSample1, E extends Throwable> T test(T param) throws
E;
+    }
+
+    public void test_getGeneric() throws Exception {
+        // Regression for HARMONY-5622, HARMONY-5790
+        Method method = GenericSample1.class.getMethods()[0];
+        for (int i = 0; i < 5; i++) {
+            switch (i) {
+            case 0: method.getGenericParameterTypes();
+                break;
+            case 1: method.getGenericReturnType();
+                break;
+            case 2: method.getGenericExceptionTypes();
+                break;
+            case 3: method.getTypeParameters();
+                break;
+            case 4: method.toGenericString();
+                break;
+            }
+        }
+    }
+
+    interface GenericSample2 {
+        public <T extends GenericSample2, E extends Throwable> T test(T param) throws
E;
     }
 
     boolean success;
 
-    public void test_getGeneric() throws Exception {
-        // Regression for HARMONY-5622
+    public void test_getGenericThread() throws Exception {
+        // Regression for HARMONY-5622, HARMONY-5790
         success = false;
         Thread thread = new Thread() {
             public void run() {
                 try { // Using separate thread to avoid stack overflow
-                    Method method = GenericSample.class.getMethods()[0];
+                    Method method = GenericSample2.class.getMethods()[0];
                     for (int i = 0; i < 5; i++) {
                         switch (i) {
                         case 0: method.getGenericParameterTypes();
@@ -370,4 +396,5 @@
         thread.join();
         assert(success);
     }
+    */
 }



Mime
View raw message