cvs commit: jakarta-bcel/src/java/org/apache/bcel/util ClassLoaderRepository.java

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
mdahm       2002/07/31 11:12:08

  Modified:    src/java/org/apache/bcel/util ClassLoaderRepository.java
  Log:
  Check for null
  
  Revision  Changes    Path
  1.3       +4 -0      jakarta-bcel/src/java/org/apache/bcel/util/ClassLoaderRepository.java
  
  Index: ClassLoaderRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-bcel/src/java/org/apache/bcel/util/ClassLoaderRepository.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassLoaderRepository.java	6 Jun 2002 11:33:20 -0000	1.2
  +++ ClassLoaderRepository.java	31 Jul 2002 18:12:07 -0000	1.3
  @@ -121,6 +121,10 @@
   	try {
   	    InputStream is = 
   		loader.getResourceAsStream( classFile + ".class" );
  +	    
  +	    if(is == null) {
  +		throw new ClassNotFoundException(className + " not found.");
  +	    }
   
   	    ClassParser parser = new ClassParser( is, className );
   	    RC = parser.parse();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.