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 18:55:21 UTC
DO NOT REPLY [Bug 32611] New: -
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
Summary: ClassCastException from Custom Task
Product: Ant
Version: 1.6.2
Platform: PC
OS/Version: Windows 2000
Status: NEW
Keywords: ErrorMessage
Severity: normal
Priority: P2
Component: Other
AssignedTo: dev@ant.apache.org
ReportedBy: shawn.price@ngc.com
CC: shawn.price@ngc.com
We are in the process of testing upgrade from Ant 1.4 to 1.6.2. We had
previously developed a custom copy task that overrides Copy.doFileOperation().
After updating the proper libraries, I attempted to run our applications
build. What resulted was a ClassCastException (with no message) when
attempting to get the name of the next destination file name from fileCopyMap
(from org.apache.tools.ant.taskdefs.Copy) using the source file name. Due to
restrictions on corporate proprietary info, I cannot provide all the source
code, but the offending line is:
String destinationFile = (String)fileCopyMap.get(sourceFile);
, which generates the following lines in stack trace (reprinted):
[copy] com.ourapp.tools.ant.build.CustomCopyTask.doFileOperations
(CustomCopyTask.java.88)
[copy] org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:421)
[copy] org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
...
Incidentally, I've done some troubleshooting, and found through fileCopyMap.get
(sourceFile).getClass().getName() that the type (at least as far was the
serialization mechanism is concerned) is still java.lang.String. Can anyone
help me on 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