DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40334>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40334

           Summary: Possible NPE in TarInputStream
           Product: Ant
           Version: 1.7.0Beta1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


I'm running Jtest's BugDetective feature on Ant-1.7.0Beta1 and it reports a
possible NullPointerException in TarInputStream.

The problem is said to happen in getNextEntry() method at line 266 when
setName() is called on `currEntry' field.

BugDetective reports that despite at line 251 there is check for the field to be
non-null:

        if (this.currEntry != null && this.currEntry.isGNULongNameEntry()) {

The field can still have null value at line 266 because at line 259
getNextEntry() is called recursively and can assign null to the field if it hits
EOF.

I'm attaching a screenshot from BugDetective which describes the exact flow
which may lead to the exception.

Please let me know if this is a real problem or BugDetective is mistaken.

Thank you!

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to