karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [05/50] [abbrv] karaf git commit: [KARAF-4630] Fix race condition in StreamPumper
Date Mon, 22 Aug 2016 09:30:03 GMT
[KARAF-4630] Fix race condition in StreamPumper


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/b521f761
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/b521f761
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/b521f761

Branch: refs/heads/master
Commit: b521f76166462bac783ee8d5a3f142164cf4548a
Parents: 62ed8f9
Author: jpoth <jpoth@redhat.com>
Authored: Tue Jul 19 18:27:53 2016 +0200
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Mon Aug 22 11:29:19 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/karaf/util/process/StreamPumper.java  | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/b521f761/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java b/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java
index 3001442..9068fba 100644
--- a/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java
+++ b/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java
@@ -31,9 +31,9 @@ public class StreamPumper implements Runnable {
 
     private OutputStream out;
 
-    private volatile boolean finish;
+    private volatile boolean finish = false;
 
-    private volatile boolean finished;
+    private volatile boolean finished = false;
 
     private boolean closeWhenExhausted;
 
@@ -109,8 +109,6 @@ public class StreamPumper implements Runnable {
     public void run() {
         synchronized (this) {
             started = true;
-            finished = false;
-            finish = false;
             thread = Thread.currentThread();
         }
 


Mime
View raw message