You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stefan Bodewig <bo...@apache.org> on 2003/11/18 11:00:52 UTC

[COLLECTIONS] Tests fail with JDK 1.4.2

Hi,

I've been investigating collection's GUMP failure
<http://gump.covalent.net/log/commons-collections.html> that we are
seeing since you've refactored the test hierarchy.

I added an e.getTargetException().printStackTrace(); to
BulkTest#addBulk's catch block for InvocationTargetExceptions to see
where the problem arises.

What we get are a whole bunch of VerifyErrors as
oacc.list.AbstractTestList$BulkTestSubList accesses protected methods
and data that have been indirectly inherited from
oacc.collection.AbstractTestCollection.

I don't quite understand why the compiler allows this but the runtime
fails, but that's the reason and it even occurs if I run

java -cp JUNIT:COMMONS/collections/dist/classes/ org.apache.commons.collections.TestAllPackages

with a completely empty CLASSPATH, so it is not Gump-only issue - I
would have suspected a classloader problem otherwise.

Access to protected methods is no longer a problem if you mirror the
methods in oacc.list.AbstractTestList - but there is no way to make the
verifier happy with the access of protected data (apart from protected
and mirrored setters, that is).

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org