You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2005/08/11 22:43:27 UTC

DO NOT REPLY [Bug 36151] New: - PropertySet::addPropertyNames causes NullPointerException

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=36151>.
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=36151

           Summary: PropertySet::addPropertyNames causes
                    NullPointerException
           Product: Ant
           Version: 1.6.5
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: wascallywabbit@earthling.net


The function addPropertyNames(Set names, Hashtable properties) does not use the
passed in hashtable to check for refitems that use the "name" field. This is a
problem for property helper's that have hooks attached. If the property is
matched by a hook but is not part of the project's property table (i.e missing
from "properties" but non-null for Project.getProperty()), a null value will be
returned at line 320 in PropertySet.java.

Changing line 346 to:
 if (prj != null && properties.get(r.name) != null) {

should fix the problem.

-- 
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org