You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2015/08/06 12:33:45 UTC

tomee git commit: TOMEE-1622 ensure we init SystemInstance supporting concurrency on System.getProperties()

Repository: tomee
Updated Branches:
  refs/heads/master c3a65be8d -> e3411b761


TOMEE-1622 ensure we init SystemInstance supporting concurrency on System.getProperties()


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

Branch: refs/heads/master
Commit: e3411b761a0267364e2b3230fb3829ed480de4da
Parents: c3a65be
Author: Romain Manni-Bucau <rm...@starbucks.com>
Authored: Thu Aug 6 03:33:39 2015 -0700
Committer: Romain Manni-Bucau <rm...@starbucks.com>
Committed: Thu Aug 6 03:33:39 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/openejb/loader/SystemInstance.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/e3411b76/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java
----------------------------------------------------------------------
diff --git a/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java b/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java
index f53d1cb..8ce4dc0 100644
--- a/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java
+++ b/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java
@@ -62,8 +62,7 @@ public final class SystemInstance {
         this.components = new HashMap<Class, Object>();
 
         // import JVM system property config (if a resource/container/... is set through this way)
-        for (final Map.Entry<Object, Object> e : System.getProperties().entrySet()) {
-            final String key = e.getKey().toString();
+        for (final String key : System.getProperties().stringPropertyNames()) {
             if (key.startsWith("sun.")) {
                 continue;
             }
@@ -106,7 +105,10 @@ public final class SystemInstance {
                     continue;
                 }
             }
-            this.internalProperties.put(e.getKey(), e.getValue());
+            final String value = System.getProperty(key);
+            if (value != null) {
+                this.internalProperties.put(key, value);
+            }
         }
         this.internalProperties.putAll(properties);
         this.options = new Options(internalProperties, new Options(System.getProperties()));