commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BCEL-25) Repository.instanceOf() can throw NullPointerException
Date Thu, 24 Apr 2014 12:13:18 GMT

     [ https://issues.apache.org/jira/browse/BCEL-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Bourg updated BCEL-25:
-------------------------------

             Priority: Major
          Environment:     (was: Operating System: All
Platform: All)
    Affects Version/s:     (was: unspecified)
        Fix Version/s: 5.2
             Priority:   (was: P3)
             Severity:   (was: normal)

> Repository.instanceOf() can throw NullPointerException
> ------------------------------------------------------
>
>                 Key: BCEL-25
>                 URL: https://issues.apache.org/jira/browse/BCEL-25
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Main
>            Reporter: David Hovemeyer
>            Assignee: Apache Commons Developers
>             Fix For: 5.2
>
>
> 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



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message