Bug 54151 - wasted work in FailureRecorder.setProject()
Summary: wasted work in FailureRecorder.setProject()
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.9.1
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: 1.9.4
Assignee: Ant Notifications List
Keywords: PatchAvailable
Depends on:
Reported: 2012-11-15 19:58 UTC by Adrian Nistor
Modified: 2014-01-02 14:38 UTC (History)
1 user (show)

patch (621 bytes, patch)
2012-11-15 19:58 UTC, Adrian Nistor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Nistor 2012-11-15 19:58:23 UTC
Created attachment 29602 [details]

The problem appears in version 1.8.4 and in revision 1409946.  I
attached a one-line patch that fixes it.

In method "FailureRecorder.setProject", the loop over "allListeners"
should call "break" (not "continue", as it does currently) immediately
after "alreadyRegistered" is set to "true".  All the iterations after
"alreadyRegistered" is set to "true" do not perform any useful work,
at best they just set "alreadyRegistered" again to "true".
Comment 1 Stefan Bodewig 2014-01-02 14:38:26 UTC
svn revision 1554813