Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.0
-
None
Description
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
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