ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40565] New: - NPE in <copy> if a resource has no name
Date Thu, 21 Sep 2006 08:56:01 GMT
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=40565>.
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=40565

           Summary: NPE in <copy> if a resource has no name
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: stevel@apache.org


We have an NPE in a copy if the resource doesnt have a name:


   <copy todir="${build.dir}">
     <res:random size="8192"/>
   </copy>

leads to 

--- Nested Exception ---
java.lang.NullPointerException
       at org.apache.tools.ant.util.ResourceUtils.selectOutOfDateSources(Resour
ceUtils.java:156)
       at org.apache.tools.ant.util.ResourceUtils.selectOutOfDateSources(Resour
ceUtils.java:124)
       at org.apache.tools.ant.taskdefs.Copy.buildMap(Copy.java:730)
       at org.apache.tools.ant.taskdefs.Copy.scan(Copy.java:662)
       at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:545)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:276)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)

I dont know what the correct behaviour for an anonymous resource should be in a
copy, but an NPE is not it.

-- 
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


Mime
View raw message