deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [2/2] deltaspike git commit: DELTASPIKE-1251 apply ConfigFilter to PersistenceConfiguration values
Date Wed, 17 May 2017 20:37:45 GMT
DELTASPIKE-1251 apply ConfigFilter to PersistenceConfiguration values


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

Branch: refs/heads/master
Commit: 301ff1b4e73a547b1e1be5410ebbb5ff881b67c1
Parents: 84f956f
Author: Mark Struberg <struberg@apache.org>
Authored: Wed May 17 22:37:01 2017 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Wed May 17 22:37:01 2017 +0200

----------------------------------------------------------------------
 .../PersistenceConfigurationProviderImpl.java             | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/301ff1b4/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/entitymanager/PersistenceConfigurationProviderImpl.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/entitymanager/PersistenceConfigurationProviderImpl.java
b/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/entitymanager/PersistenceConfigurationProviderImpl.java
index 3bcb2ce..8f97a90 100644
--- a/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/entitymanager/PersistenceConfigurationProviderImpl.java
+++ b/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/entitymanager/PersistenceConfigurationProviderImpl.java
@@ -21,6 +21,7 @@ package org.apache.deltaspike.jpa.impl.entitymanager;
 import javax.enterprise.context.ApplicationScoped;
 
 
+import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
@@ -53,6 +54,15 @@ public class PersistenceConfigurationProviderImpl implements PersistenceConfigur
             unitProperties = new Properties();
         }
 
+        // apply ConfigFilters to the configured values.
+        for (Map.Entry entry : unitProperties.entrySet())
+        {
+            String key = (String) entry.getKey();
+            String value = (String) entry.getValue();
+
+            entry.setValue(ConfigResolver.filterConfigValue(key, value));
+        }
+
         unitProperties = addConfigProperties(unitProperties, persistenceUnitName);
 
         return unitProperties;


Mime
View raw message