Author: sebb
Date: Mon Feb 23 15:50:05 2009
New Revision: 747054

URL: http://svn.apache.org/viewvc?rev=747054&view=rev
Log:
Other accesses to watch and process are synchronized
Make private field final

Modified:
    
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java

Modified: 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java?rev=747054&r1=747053&r2=747054&view=diff
==============================================================================
--- 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java
 (original)
+++ 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java
 Mon Feb 23 15:50:05 2009
@@ -49,7 +49,7 @@
     private boolean killedProcess;
 
     /** Will tell us whether timeout has occurred. */
-    private Watchdog watchdog;
+    private final Watchdog watchdog;
 
     /**
      * Creates a new watchdog with a given timeout.
@@ -172,7 +172,7 @@
     /**
      * reset the monitor flag and the process.
      */
-    protected void cleanUp() {
+    protected synchronized void cleanUp() {
         watch = false;
         process = null;
     }    


Reply via email to