DO NOT REPLY [Bug 18031] New: - ConstantPoolGen.lookupClass(String) finds LAST entry rather than first
| Newsgroups | gmane.comp.jakarta.bcel.devel |
|---|---|
| Message-ID | <[email protected]> |
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18031>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18031
ConstantPoolGen.lookupClass(String) finds LAST entry rather than first
Summary: ConstantPoolGen.lookupClass(String) finds LAST entry
rather than first
Product: BCEL
Version: 5.0RC1
Platform: All
URL: http://www.markcrocker.com/~mcrocker/Computer/Purifier/w
rongClassrefIssue.shtml
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Main
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
I have discovered a class file that has multiple CONSTANT_Class entries in the
ConstantPool that point to the same CONSTANT_Utf8 class name string. The
ConstantPoolGen.lookupClass(String) method seems to return the index for the
LAST of the two CONSTANT_Class entries instead of the first. Details are
available from:
http://www.markcrocker.com/~mcrocker/Computer/Purifier/wrongClassrefIssue.shtml
This is a problem because I am attempting to create pure Java J2ME preverifier
(The Purifier: http://www.markcrocker.com/~mcrocker/Computer/Purifier/).
Ideally, it should produce the same StackMaps as SUN's preverifier. However, in
the case of this unusual class, it cannot because it uses BCEL and BCEL's
lookupClass produces a different index than SUN's preverifier for the particular
class that happens to have two possible indecies.