You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2014/04/24 14:13:18 UTC
[jira] [Updated] (BCEL-25) Repository.instanceOf() can throw
NullPointerException
[ 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)