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 2004/12/09 19:04:46 UTC

DO NOT REPLY [Bug 32611] - ClassCastException from Custom Task

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


peterreilly@apache.org changed:

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




------- Additional Comments From peterreilly@apache.org  2004-12-09 19:04 -------
The internals of Copy was changed from ant 1.5 to ant 1.6
to allow a file to be copied to multiple locations.

It now stores the a String[] in fileCopyMap.

You need to do:
String[] destinationFiles = (String[])fileCopyMap.get(sourceFile)

    for (int i = 0; i < destinationFiles.length; i++) {
                    String destinationFile = destinationFiles[i];
...

If you want to use the custom task in both ant 1.5 and ant 1.6 you
need to check the type:

Object dFiles = fileCopyMap.get(sourceFile)
if (dFiles instanceof String) {
   ... 1.5 code
} else {
   ... 1.6 code
}

Sorry about the inconvience.

Marking this as an *WONTFIX*, as there is not much that
can be done to fix this.

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