tapestry-ioc didn't passes tests with ibm jdk5
----------------------------------------------
Key: TAPESTRY-1816
URL: https://issues.apache.org/jira/browse/TAPESTRY-1816
Project: Tapestry
Issue Type: Bug
Components: tapestry-ioc
Affects Versions: 5.0
Environment: $ java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxa64devifx-20070806
(SR5a))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux amd64-64 j9vmxa6423-20070426
(JIT enabled)
J9VM - 20070420_12448_LHdSMr
JIT - 20070419_1806_r8
GC - 200704_19)
JCL - 20070725
Reporter: Pavel Volkovitskiy
Attachments: ClassFabImplTest.patch, MethodIterator.patch,
MethodSignature.patch, MethodSignatureTest.patch
I'm tried to build tapestry5-ioc with ibm jdk
There is 3 failed test:
src/test/java/org/apache/tapestry/ioc/internal/services/ClassFabImplTest.java:
======================================================================================
public void attempt_to_subclass_from_final_class() throws Exception
{
ClassFab cf = newClassFab("StringSubclass", String.class);
try
{
cf.createClass();
}
catch (RuntimeException ex)
{
assertExceptionRegexp(
ex,
"Unable to create class StringSubclass\\: .*");
}
}
======================================================================================
but on ibm jdk it's "Unable to create class StringSubclass: by
java.lang.VerifyError: java.lang.String"
src/test/java/org/apache/tapestry/ioc/services/MethodIteratorTest.java:
======================================================================================
public void inherited_methods_from_super_interface() {
MethodIterator mi = new MethodIterator(Play.class);
assertTrue(mi.hasNext());
// Problematic because the order in which they are returned is
// JDK specific and not defined! Perhaps we should sort by alpha?
MethodSignature actual = mi.next();
assertEquals(new MethodSignature(void.class, "jump", null, null),
actual);
assertTrue(mi.hasNext());
actual = mi.next();
assertEquals(new MethodSignature(void.class, "run", null, null),
actual);
assertFalse(mi.hasNext());
assertEquals(false, mi.getToString());
}
======================================================================================
the problem is already described :) on ibm jdk i get other order
the solution may be to check in order neutral way here or fix MethodIterator to
iterate over ordered list (i personally prefer this way)
and the last one:
src/test/java/org/apache/tapestry/ioc/services/MethodSignatureTest.java:
======================================================================================
public void to_string() {
MethodSignature m = find(String.class, "getChars");
assertEquals(m.toString(), "void getChars(int, int, char[], int)");
m = find(Class.class, "newInstance");
assertEquals(
m.toString(),
"java.lang.Object newInstance() throws
java.lang.IllegalAccessException, java.lang.InstantiationException");
}
======================================================================================
the problem is that i get "java.lang.Object newInstance() throws
java.lang.InstantiationException, java.lang.IllegalAccessException" with jdk
(ie wrong order of exceptions)
also it can be fixed here or (what i likes more) to_string may return ordered
list of exceptions
i tried to fix these errors, trivial patches in attachment
please, review and apply/comment
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]