aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject aries-containers git commit: Small improvement, make member field final.
Date Tue, 30 May 2017 15:29:07 GMT
Repository: aries-containers
Updated Branches:
  refs/heads/master 4e11542a3 -> 4cc379418


Small improvement, make member field final.


Project: http://git-wip-us.apache.org/repos/asf/aries-containers/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-containers/commit/4cc37941
Tree: http://git-wip-us.apache.org/repos/asf/aries-containers/tree/4cc37941
Diff: http://git-wip-us.apache.org/repos/asf/aries-containers/diff/4cc37941

Branch: refs/heads/master
Commit: 4cc3794182557c77466ac33227cc5f2b0748e547
Parents: 4e11542
Author: David Bosschaert <davidb@apache.org>
Authored: Tue May 30 16:28:38 2017 +0100
Committer: David Bosschaert <davidb@apache.org>
Committed: Tue May 30 16:28:38 2017 +0100

----------------------------------------------------------------------
 .../docker/local/impl/LocalDockerServiceManager.java        | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aries-containers/blob/4cc37941/containers-docker-local/src/main/java/org/apache/aries/containers/docker/local/impl/LocalDockerServiceManager.java
----------------------------------------------------------------------
diff --git a/containers-docker-local/src/main/java/org/apache/aries/containers/docker/local/impl/LocalDockerServiceManager.java
b/containers-docker-local/src/main/java/org/apache/aries/containers/docker/local/impl/LocalDockerServiceManager.java
index be91761..c64e99a 100644
--- a/containers-docker-local/src/main/java/org/apache/aries/containers/docker/local/impl/LocalDockerServiceManager.java
+++ b/containers-docker-local/src/main/java/org/apache/aries/containers/docker/local/impl/LocalDockerServiceManager.java
@@ -60,13 +60,16 @@ public class LocalDockerServiceManager implements ServiceManager {
             : "localhost";
 
 
-    private volatile LocalDockerController docker;
+    private final LocalDockerController docker;
     private final ConcurrentMap<String, Service> services =
             new ConcurrentHashMap<>();
 
     public LocalDockerServiceManager() {
-        if (docker == null)
-            docker = new LocalDockerController();
+        this(new LocalDockerController());
+    }
+
+    LocalDockerServiceManager(LocalDockerController docker) {
+        this.docker = docker;
     }
 
     List<String> getDockerIDs(ServiceConfig config) {


Mime
View raw message