harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject svn commit: r641443 - /harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/reflect/MethodTest.java
Date Wed, 26 Mar 2008 17:59:39 GMT
Author: vmz
Date: Wed Mar 26 10:59:36 2008
New Revision: 641443

URL: http://svn.apache.org/viewvc?rev=641443&view=rev
Log:
HARMONY-5622 [drlvm][kernel][geronimo] Method.getGeneric*() methods throw NPE for parametrized
interface methods
Added a regression test test_getGeneric() to java.lang.reflect.MethodTest

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=641443&r1=641442&r2=641443&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 Wed Mar
26 10:59:36 2008
@@ -332,4 +332,30 @@
             fail("Error2: " + e.toString());
         }
     }
-}
\ No newline at end of file
+
+    interface GenericSample {
+        public <T extends GenericSample, E extends Throwable> T test(T param) throws
E;
+    }
+
+    /**
+     *  
+     */
+    public void test_getGeneric() {
+        // Regression for HARMONY-5622
+        Method method = GenericSample.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;
+            }
+        }
+    }
+}



Mime
View raw message