tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject tomee git commit: #TOMEE-1465 - Do not cache system properties.
Date Tue, 02 Dec 2014 11:53:37 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x 987b71b83 -> 039495dd3


#TOMEE-1465 - Do not cache system properties.


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

Branch: refs/heads/tomee-1.7.x
Commit: 039495dd333e4a65cff034e0f7ffd793022a286f
Parents: 987b71b
Author: andygumbrecht <andygumbrecht@apache.org>
Authored: Tue Dec 2 12:29:19 2014 +0100
Committer: andygumbrecht <andygumbrecht@apache.org>
Committed: Tue Dec 2 12:29:19 2014 +0100

----------------------------------------------------------------------
 .../org/apache/openejb/util/PropertyPlaceHolderHelper.java     | 6 +++---
 .../java/org/apache/openejb/util/PropertyPlaceHolderTest.java  | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/039495dd/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java
b/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java
index f245f0e..7430482 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/util/PropertyPlaceHolderHelper.java
@@ -123,12 +123,12 @@ public final class PropertyPlaceHolderHelper {
     }
 
     private static class PropertiesLookup extends StrLookup<Object> {
-        private static Properties PROPERTIES = SystemInstance.get().getProperties();
+
         private static final Map<String, String> ENV = System.getenv();
 
         @Override
         public synchronized String lookup(final String key) {
-            String value = PROPERTIES.getProperty(key);
+            String value = SystemInstance.get().getProperties().getProperty(key);
             if (value != null) {
                 return value;
             }
@@ -142,7 +142,7 @@ public final class PropertyPlaceHolderHelper {
         }
 
         public synchronized void reload() {
-            PROPERTIES = SystemInstance.get().getProperties();
+            //no-op
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/039495dd/container/openejb-core/src/test/java/org/apache/openejb/util/PropertyPlaceHolderTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/util/PropertyPlaceHolderTest.java
b/container/openejb-core/src/test/java/org/apache/openejb/util/PropertyPlaceHolderTest.java
index d79e5eb..1c9a354 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/util/PropertyPlaceHolderTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/util/PropertyPlaceHolderTest.java
@@ -23,6 +23,7 @@ import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 
 public class PropertyPlaceHolderTest {
+
     @Test
     public void cipher() {
         SystemInstance.get().setProperty("PropertyPlaceHolderTest", "cipher:Static3DES:xMH5uM1V9vQzVUv5LG7YLA==");


Mime
View raw message