Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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