Potential Software Failure
David Dixon-Peugh <[email protected]>
| Newsgroups | gmane.comp.jakarta.bcel.devel |
|---|---|
| Message-ID | <[email protected]> |
I have found what I believe to be a bug in BCEL, and would like to see if anyone else has seen this in the wild. Basically, I'm generating code that looks like this: ACONST_NULL ICONST( 0 ) INVOKEVIRTUAL ( runTest(I)I ) ICONST( 0 ) IRETURN [catch NullPointerException] ICONST( 0 ) IRETURN The idea is to force a NullPointerException to be raised, and then catch it with a Catch clause. This is being done in a MethodGen object, using "addExceptionHandler(...)" to create the CodeExceptionGen inside the MethodGen. (Adding a CodeExceptionGen is a good idea. We should be able to do that directly.) When the MethodGen.getMethod() is called, if you take a look at the "getExceptionTable()" result, you basically get nothing. (Catch table wasn't written to Method.) I presume this is a bug, if I'm doing something wrong let me know. DDP __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com