DO NOT REPLY [Bug 19476] New: - Repository.instanceOf() can throw NullPointerException
| 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=19476>.
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=19476
Repository.instanceOf() can throw NullPointerException
Summary: Repository.instanceOf() can throw NullPointerException
Product: BCEL
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Main
AssignedTo: [email protected]
ReportedBy: [email protected]
org.apache.bcel.Repository.instanceOf(JavaClass clazz, JavaClass super_class)
can throw NullPointerException. Here's how:
1. instanceOf(String, String) is called
2. it calls lookupClass(String) using "clazz" as a parameter
3. in lookupClass(String), the inner _repository object throws a
ClassNotFoundException, so lookupClass() returns null
4. instanceOf(String, String) calls instanceOf(JavaClass, JavaClass) with the
first parameter null
5. instanceOf(JavaClass, JavaClass) invokes instanceOf(JavaClass) on its first
parameter, resulting in a NullPointerException