You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by bu...@apache.org on 2009/05/22 20:41:22 UTC

DO NOT REPLY [Bug 47249] New: org.apache.bcel.classfile.ClassParser: NullPointerException caused by invalid filename

https://issues.apache.org/bugzilla/show_bug.cgi?id=47249

           Summary: org.apache.bcel.classfile.ClassParser:
                    NullPointerException caused by invalid filename
           Product: BCEL
           Version: 5.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: bcel-dev@jakarta.apache.org
        ReportedBy: qweasd-v6ak@soukroma.cz
        Depends on: 47248


121: ZipEntry entry = zip.getEntry(file_name);
Problem: if file_name is invalid, zip.getEntry(file_name) returns null. It
causes NullPointerException:
122: file = new DataInputStream(new
BufferedInputStream(zip.getInputStream(entry),
                            BUFSIZE));
// zip.getInputStream(entry) throws NullPointerException because entry is null!

Note that you will probably see another NullPointerException if #47248 is not
corrected.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 47249] org.apache.bcel.classfile.ClassParser: NullPointerException caused by invalid filename

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47249





--- Comment #1 from Vít Šesták aka v6ak <qw...@soukroma.cz>  2009-05-22 11:42:53 PST ---
Try to insert after 121 code like this:
                    if(entry == null){
                        throw new IOException("File "+file_name+" not found");
                    }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 47249] org.apache.bcel.classfile.ClassParser: NullPointerException caused by invalid filename

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47249


Bug 47249 depends on bug 47248, which changed state.

Bug 47248 Summary: org.apache.bcel.classfile.ClassParser: NullPointerException caused by fileopen failed
https://issues.apache.org/bugzilla/show_bug.cgi?id=47248

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 47249] org.apache.bcel.classfile.ClassParser: NullPointerException caused by invalid filename

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47249

Torsten Curdt <tc...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Torsten Curdt <tc...@apache.org> 2010-01-10 12:11:45 UTC ---
Thx!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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