DO NOT REPLY [Bug 24766] New: - Problem with generic.Instruction in Turkish locale
| 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=24766>.
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=24766
Problem with generic.Instruction in Turkish locale
Summary: Problem with generic.Instruction in Turkish locale
Product: BCEL
Version: 5.1
Platform: PC
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Main
AssignedTo: [email protected]
ReportedBy: [email protected]
The method
generic.Instruction.readInstruction()
calls
generic.Instruction.className(short)
which uses toUpperCase() in its implementation.
This is brittle; in the Turkish locale, for example
"I".toLowerCase() != "i"
"i".toUpperCase() != "I"
This was reported to me at the AspectJ project from an actual user who
gets
org.apache.bcel.generic.ClassGenException: Illegal opcode detected.
at org.apache.bcel.generic.Instruction.readInstruction
(Instruction.java:189)
at org.apache.bcel.generic.InstructionList.<init>
(InstructionList.java:193)
when using AspectJ (which uses BCEL) under the Turkish locale. So this
is a problem that's appearing in the wild *smile*.
I may get around to patching it myself before our next release,
in which case I'll probably just rip out the Class.forName stuff inside
Instruction.readInstruction()
which is the thing really causing the problem (is that there for expansion,
in case users define their own bytecodes? I'm confused as to why there
isn't just a 256-wide dispatch).