Author: jgrassel
Date: Tue Aug 21 18:14:37 2012
New Revision: 1375702

URL: http://svn.apache.org/viewvc?rev=1375702&view=rev
Log:
OPENJPA-428: 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=1375702&r1=1375701&r2=1375702&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
 Tue Aug 21 18:14:37 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=1375702&r1=1375701&r2=1375702&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
 Tue Aug 21 18:14:37 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);
+        }
     }
 
     /**


Reply via email to