#240 The 'forget' task creates race conditions

open
nobody
process (9)
5
2010-06-07
2010-06-07
vmiazzo
No

The 'forget' task doesn't use the new (ANT >=1.8.0) org.apache.tools.ant.property.LocalProperties.copy() API.
As consequences, the 'local' task often reports ConcurrentModificationException or NoSuchElementException.

Caused by: java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
at java.util.LinkedList$ListItr.next(LinkedList.java:696)
at org.apache.tools.ant.property.LocalPropertyStack.getMapForProperty(LocalPropertyStack.java:143)
at org.apache.tools.ant.property.LocalPropertyStack.setNew(LocalPropertyStack.java:114)
at org.apache.tools.ant.property.LocalProperties.setNew(LocalProperties.java:136)
at org.apache.tools.ant.PropertyHelper.setNewProperty(PropertyHelper.java:697)
at org.apache.tools.ant.Project.setNewProperty(Project.java:553)
at org.apache.tools.ant.taskdefs.TempFile.execute(TempFile.java:160)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor186.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)
... 31 more

Caused by: java.util.NoSuchElementException
at java.util.LinkedList.remove(LinkedList.java:788)
at java.util.LinkedList.removeFirst(LinkedList.java:134)
at org.apache.tools.ant.property.LocalPropertyStack.exitScope(LocalPropertyStack.java:63)
at org.apache.tools.ant.property.LocalProperties.exitScope(LocalProperties.java:94)
at org.apache.tools.ant.Target.execute(Target.java:396)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.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)
... 11 more

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks