You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/06/03 09:19:44 UTC
DO NOT REPLY [Bug 47306] New: replacetokens fails if file/stream
ends on @
https://issues.apache.org/bugzilla/show_bug.cgi?id=47306
Summary: replacetokens fails if file/stream ends on @
Product: Ant
Version: 1.7.1
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: martineigenbrodt@googlemail.com
I've used the copy task with a replacetokens filter. The File I'm coping ends
on "@". This results in an exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:687)
at
org.apache.tools.ant.filters.ReplaceTokens.getNextChar(ReplaceTokens.java:99)
at
org.apache.tools.ant.filters.ReplaceTokens.read(ReplaceTokens.java:133)
at
org.apache.tools.ant.filters.BaseFilterReader.read(BaseFilterReader.java:83)
at java.io.BufferedReader.read1(BufferedReader.java:185)
at java.io.BufferedReader.read(BufferedReader.java:261)
at
org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:358)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:475)
at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:304)
at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:805)
at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:496)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Workaround: Add a char at the end of the file
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 47306] replacetokens fails if file/stream ends on
@
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47306
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |1.8.0
--- Comment #1 from Stefan Bodewig <bo...@apache.org> 2009-06-03 06:03:20 PST ---
fixed with svn revision 781357 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=781357 )
Thanks!
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.