The PropertiesVisitorImpl doesn't work properly when the tests are jared.
e.g. In the Microcontainer tests
there is an AbstractKernelTest in org.jboss.test.kernel
which has a method "bootstrap" which is also the name
of a subdirectory.
When the tests are not jared it works, probably
because the resource has a trailing slash? e.g.
.../org/jboss/test/kernel/bootstrap/
but when it is jared it finds the directory
jar:file:/home/ejort/jboss-head/kernel/output/lib/jboss-microcontainer-test.jar!/org/jboss/test/kernel/bootstrap
and tries to open it as a property file which obviously fails :-)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.jboss.test.security.PolicyPlugin.getInstance(PolicyPlugin.java:71)
at org.jboss.test.AbstractTestDelegate.setUpSecurity(AbstractTestDelegate.java:175)
at org.jboss.test.AbstractTestDelegate.setUp(AbstractTestDelegate.java:123)
at org.jboss.test.AbstractTestSetup.setUp(AbstractTestSetup.java:63)
at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
at junit.extensions.TestSetup.run(TestSetup.java:23)
Caused by: java.lang.NullPointerException
at java.io.FilterInputStream.read(FilterInputStream.java:111)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at java.util.Properties$LineReader.readLine(Properties.java:365)
at java.util.Properties.load(Properties.java:293)
at org.jboss.test.visitor.PropertiesVisitorImpl.loadProperties(PropertiesVisitorImpl.java:148)
at org.jboss.test.visitor.PropertiesVisitorImpl.visitMethods(PropertiesVisitorImpl.java:109)
at org.jboss.test.visitor.TypeHierarchyTraversal.processType(TypeHierarchyTraversal.java:57)
at org.jboss.test.visitor.TypeHierarchyTraversal.visit(TypeHierarchyTraversal.java:47)
at org.jboss.test.security.TestsPolicyPlugin.(TestsPolicyPlugin.java:64)
For now I'm going to change it to ignore the NPE????