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: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to