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 2015/02/11 12:00:50 UTC
[Bug 55074] org.apache.tools.ant.property.LocalPropertyStack
implementation is not thread-safe
https://issues.apache.org/bugzilla/show_bug.cgi?id=55074
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |1.9.5
Summary|Inefficient |org.apache.tools.ant.proper
|org.apache.tools.ant.proper |ty.LocalPropertyStack
|ty.LocalPropertyStack |implementation is not
|implementation |thread-safe
--- Comment #3 from Stefan Bodewig <bo...@apache.org> ---
As additional context: http://marc.info/?t=142130235000003&r=1&w=2
I agree with your analysis. But it's not only <forget>, the same thing could
happen with other tasks running code that may spawn threads like <java> or
<junit> - it's just less likely they will access the properties.
Wrapping the list in synchronizedList will not be enough since the class uses
the LinkedList API for convenience. Also addLocal's implementation contains a
race-condition right now.
Too bad there is no Concurrent* implementation of Stack or Deque - we'd need a
ConcurrentLinkedQueue with LIFO semantics.
I'll add a bunch of manual synchronization.
--
You are receiving this mail because:
You are the assignee for the bug.