You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by bu...@apache.org on 2003/04/30 15:47:32 UTC

DO NOT REPLY [Bug 19476] New: - Repository.instanceOf() can throw NullPointerException

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: bcel-dev@jakarta.apache.org
        ReportedBy: daveho@cs.umd.edu


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

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org