jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r897697 - /jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java
Date Sun, 10 Jan 2010 20:11:08 GMT
Author: tcurdt
Date: Sun Jan 10 20:11:08 2010
New Revision: 897697

URL: http://svn.apache.org/viewvc?rev=897697&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=47249

fixed a possible NPE


Modified:
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java?rev=897697&r1=897696&r2=897697&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java Sun Jan 10
20:11:08 2010
@@ -120,6 +120,11 @@
                 if (is_zip) {
                     zip = new ZipFile(zip_file);
                     ZipEntry entry = zip.getEntry(file_name);
+                    
+                    if (entry == null) {
+                        throw new IOException("File " + file_name + " not found");
+                    }
+                    
                     file = new DataInputStream(new BufferedInputStream(zip.getInputStream(entry),
                             BUFSIZE));
                 } else {



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


Mime
View raw message