Github user bodewig commented on a diff in the pull request:

    https://github.com/apache/ant/pull/58#discussion_r166217627
  
    --- Diff: src/main/org/apache/tools/ant/taskdefs/Parallel.java ---
    @@ -377,7 +377,7 @@ public synchronized void run() {
             }
     
             // now did any of the threads throw an exception
    -        exceptionMessage = new StringBuffer();
    +        exceptionMessage = new StringBuilder();
    --- End diff --
    
    Looking through the class I don't think `exceptionMessage` needs to be an 
instance field at all, it could be a local variable in `spinThreads` and get 
passed as an argument to `processExceptions` without doing any harm. To me it 
seems it is only ever used by a single thread.
    
    Most probably a further refactoring could get rid of the `first*` instance 
fields as well and have `processExceptions` return all their values nicely 
encapsulated in a single object - including the accumulated messages.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to