openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgras...@apache.org
Subject svn commit: r1384572 - in /openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf: ConfigurationImpl.java Configurations.java
Date Thu, 13 Sep 2012 22:28:00 GMT
Author: jgrassel
Date: Thu Sep 13 22:28:00 2012
New Revision: 1384572

URL: http://svn.apache.org/viewvc?rev=1384572&view=rev
Log:
OPENJPA-428: Restore: Bad error message regarding openjpa.Id

Modified:
    openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
    openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java

Modified: openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java?rev=1384572&r1=1384571&r2=1384572&view=diff
==============================================================================
--- openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
(original)
+++ openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
Thu Sep 13 22:28:00 2012
@@ -665,6 +665,7 @@ public class ConfigurationImpl
         // <prefix>.properties System property; remove that property so we
         // we don't warn about it
         Configurations.removeProperty("properties", remaining);
+        Configurations.removeProperty("Id", remaining, map);
 
         // now warn if there are any remaining properties that there
         // is an unhandled prop, and remove the unknown properties

Modified: openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java?rev=1384572&r1=1384571&r2=1384572&view=diff
==============================================================================
--- openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
(original)
+++ openjpa/branches/2.1.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
Thu Sep 13 22:28:00 2012
@@ -693,10 +693,16 @@ public class Configurations {
     public static Object removeProperty(String partialKey, Map props) {
         if (partialKey == null || props == null || props.isEmpty())
             return null;
- 	if (containsProperty(partialKey, props))
-	    return props.remove(ProductDerivations.getConfigurationKey(partialKey, props));
-	else 
-	    return null;
+        if (containsProperty(partialKey, props))
+            return props.remove(ProductDerivations.getConfigurationKey(partialKey, props));
+        else 
+            return null;
+    }
+
+    public static void removeProperty(String partialKey, Map<?,?> remaining, Map<?,?>
props) {
+        if (removeProperty(partialKey, remaining) != null) {
+            removeProperty(partialKey, props);
+        }
     }
 
     /**



Mime
View raw message