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-7) NullPointerException in ClassLoader
Date Thu, 24 Apr 2014 13:36:22 GMT

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

Emmanuel Bourg updated BCEL-7:
------------------------------

      Description: 
When trying to load an unknown class, a NullPointerException is thrown, but a ClassNotFoundException
should be thrown.

A patch for this is:

{code}
Index: src/java/org/apache/bcel/util/ClassLoaderRepository.java
===================================================================
RCS file:
/home/cvspublic/jakarta-bcel/src/java/org/apache/bcel/util/ClassLoaderRepository.java,v
retrieving revision 1.2
diff -r1.2 ClassLoaderRepository.java
124a125,128
>             if (is == null) {
>                 throw new ClassNotFoundException( "Class not found." );
>             }
>
{code}

  was:
When trying to load an unknown class, a NullPointerException is thrown, but a
ClassNotFoundException should be thrown.

A patch for this is:

Index: src/java/org/apache/bcel/util/ClassLoaderRepository.java
===================================================================
RCS file:
/home/cvspublic/jakarta-bcel/src/java/org/apache/bcel/util/ClassLoaderRepository.java,v
retrieving revision 1.2
diff -r1.2 ClassLoaderRepository.java
124a125,128
>             if (is == null) {
>                 throw new ClassNotFoundException( "Class not found." );
>             }
>

         Priority: Major
      Environment:     (was: Operating System: Linux
Platform: PC)
    Fix Version/s: 5.1
         Priority:   (was: P3)
         Severity:   (was: normal)

This was fixed in r152817 on 2002-07-31 by mdahm


> NullPointerException in ClassLoader
> -----------------------------------
>
>                 Key: BCEL-7
>                 URL: https://issues.apache.org/jira/browse/BCEL-7
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Main
>    Affects Versions: 5.0
>            Reporter: wombat
>            Assignee: Apache Commons Developers
>             Fix For: 5.1
>
>
> When trying to load an unknown class, a NullPointerException is thrown, but a ClassNotFoundException
should be thrown.
> A patch for this is:
> {code}
> Index: src/java/org/apache/bcel/util/ClassLoaderRepository.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-bcel/src/java/org/apache/bcel/util/ClassLoaderRepository.java,v
> retrieving revision 1.2
> diff -r1.2 ClassLoaderRepository.java
> 124a125,128
> >             if (is == null) {
> >                 throw new ClassNotFoundException( "Class not found." );
> >             }
> >
> {code}



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

Mime
View raw message