You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by Peter Lundin <pe...@home.se> on 2002/06/19 10:50:38 UTC
BCELifier
Hi,
I am using the BCELifier to get started with BCEL and it is really great. However I have problem with finally and synchronized statements like the ones below. I get a NullPointerException which I suspect is due to the handling of the Any Exception?
Is there a workaound or a patch available?
static void test0() {
System.out.println("enter test0");
try {
System.out.println("doing something test0");
} finally {
System.out.println("exit test0");
}
}
static void test1() {
Object obj = new Object();
synchronized (obj) {
System.out.println("doing something test1");
}
}
Exception in thread "main" java.lang.NullPointerException
at org.apache.bcel.util.BCELifier.printType(BCELifier.java:262)
at org.apache.bcel.util.BCELFactory.updateExceptionHandlers(BCELFactory.java:340)
at org.apache.bcel.util.BCELFactory.start(BCELFactory.java:108)
at org.apache.bcel.util.BCELifier.visitMethod(BCELifier.java:213)
at org.apache.bcel.classfile.Method.accept(Method.java:115)
at org.apache.bcel.util.BCELifier.visitJavaClass(BCELifier.java:143)
at org.apache.bcel.util.BCELifier.start(BCELifier.java:89)
at org.apache.bcel.util.BCELifier.main(BCELifier.java:298)
Regards
/Peter
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>