Hello

Today a kernel tests which used to pass a day ago started to fail. It is 
java.lang.ClassGenericsTest4 (subtest test_3) [1]. I tried to revert some VM 
and classlib (since some important classes like URLClassLoader, Hashtable and 
TreeMap were changed recently) patches but no reversion helped. It may be a 
cumulative effect of the patches now makes the test fail.

It fails somewhere deep inside of signature parser. The problem is also that 
class format parses uses antlr which makes the whole parsing quite complex.
The failure happens on a BadSignatureTemplate class which is constructed from 
bytes, parsed and its method is invoked. Apparently it has a wrong signature 
(surprise :) ).

The whole purpose of the test is not clear to me more surprising is that it 
works on RI (not on BEA). If someone could point to what may be wrong now 
with this test I would be very grateful.

I also wonder why there is no InvocationTargetException which should be 
chained with the down the stack Exception. The test_3 method uses reflection 
to invoke a method BadSignatureTemplate.test_1 which in its turn threw an 
Exception in parser. Shouldn't there be an InvocationTargetException as the 
result of Method.invoke?

Where can I look at BadSignatureTemplate.java, specifically line 13 which 
according to the stack called Class.getTypeParameters?

[1]

[EMAIL PROTECTED]: 
10113$] ./lnx_ia32_gcc_debug/deploy/jre/bin/java -Xint 
-Xbootclasspath/a:./lnx_ia32_gcc_debug/semis/kernel.tests/classes:./make/tmp/junit.jar
 -Dtest.resource.path=./lnx_ia32_gcc_debug/semis/kernel.tests/resources 
junit.textui.TestRunner java.lang.ClassGenericsTest4
..../lnx_ia32_gcc_debug/semis/kernel.tests/resources/org/apache/harmony/lang/generics/BadSignatureTemplate.class
java.lang.Exception
        at 
org.apache.harmony.lang.reflect.parser.SignatureLexer2.nextToken(SignatureLexer2.java:420)
        at antlr.TokenBuffer.fill(TokenBuffer.java:69)
        at antlr.TokenBuffer.LA(TokenBuffer.java:80)
        at antlr.LLkParser.LA(LLkParser.java:52)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__SIMPLE_CLASS_TYPE_SIGNATURE(SignatureParser.java:1457)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE_SUFFIXES(SignatureParser.java:1736)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__REFERENCE(SignatureParser.java:1408)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE(SignatureParser.java:980)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FIELD_TYPE_SIGNATURE(SignatureParser.java:844)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__BOUND(SignatureParser.java:1311)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_OR_INTERFACE_BOUNDS(SignatureParser.java:1278)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETER(SignatureParser.java:1183)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS(SignatureParser.java:1152)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS_DECL(SignatureParser.java:951)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_DECL(SignatureParser.java:535)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__DECL(SignatureParser.java:480)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.parseSignature(SignatureParser.java:378)
        at 
org.apache.harmony.lang.reflect.parser.Parser.parseSignature(Parser.java:38)
        at java.lang.Class$GACache.getTypeParameters(Class.java:1551)
        at java.lang.Class.getTypeParameters(Class.java:1020)
        at org.apache.harmony.lang.generics.BadSignatureTemplate.test_1
(BadSignatureTemplate.java:13)
        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
        at java.lang.reflect.Method.invoke(Method.java:381)
        at java.lang.ClassGenericsTest4.test_3(ClassGenericsTest4.java:793)
        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
        at java.lang.reflect.Method.invoke(Method.java:381)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at junit.textui.TestRunner.doRun(TestRunner.java:116)
        at junit.textui.TestRunner.start(TestRunner.java:172)
        at junit.textui.TestRunner.main(TestRunner.java:138)
===nextToken===: java.lang.Exception
antlr.TokenStreamException
        at 
org.apache.harmony.lang.reflect.parser.SignatureLexer2.nextToken(SignatureLexer2.java:434)
        at antlr.TokenBuffer.fill(TokenBuffer.java:69)
        at antlr.TokenBuffer.LA(TokenBuffer.java:80)
        at antlr.LLkParser.LA(LLkParser.java:52)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__SIMPLE_CLASS_TYPE_SIGNATURE(SignatureParser.java:1457)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE_SUFFIXES(SignatureParser.java:1736)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__REFERENCE(SignatureParser.java:1408)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE(SignatureParser.java:980)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FIELD_TYPE_SIGNATURE(SignatureParser.java:844)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__BOUND(SignatureParser.java:1311)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_OR_INTERFACE_BOUNDS(SignatureParser.java:1278)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETER(SignatureParser.java:1183)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS(SignatureParser.java:1152)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS_DECL(SignatureParser.java:951)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_DECL(SignatureParser.java:535)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.pr__DECL(SignatureParser.java:480)
        at 
org.apache.harmony.lang.reflect.parser.SignatureParser.parseSignature(SignatureParser.java:378)
        at 
org.apache.harmony.lang.reflect.parser.Parser.parseSignature(Parser.java:38)
        at java.lang.Class$GACache.getTypeParameters(Class.java:1551)
        at java.lang.Class.getTypeParameters(Class.java:1020)
        at org.apache.harmony.lang.generics.BadSignatureTemplate.test_1
(BadSignatureTemplate.java:13)
        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
        at java.lang.reflect.Method.invoke(Method.java:381)
        at java.lang.ClassGenericsTest4.test_3(ClassGenericsTest4.java:793)
        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
        at java.lang.reflect.Method.invoke(Method.java:381)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at junit.textui.TestRunner.doRun(TestRunner.java:116)
        at junit.textui.TestRunner.start(TestRunner.java:172)
        at junit.textui.TestRunner.main(TestRunner.java:138)
TokenStreamException: antlr.TokenStreamException
E
Time: 71.596
There was 1 error:
1) test_3(java.lang.ClassGenericsTest4)java.lang.NullPointerException


-- 
Gregory Shimansky, Intel Middleware Products Division

Reply via email to