You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by jg...@apache.org on 2012/08/24 03:33:55 UTC
svn commit: r1376805 - in
/openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf:
ConfigurationImpl.java Configurations.java
Author: jgrassel
Date: Fri Aug 24 01:33:55 2012
New Revision: 1376805
URL: http://svn.apache.org/viewvc?rev=1376805&view=rev
Log:
OPENJPA-428: Bad error message regarding openjpa.Id
Modified:
openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
Modified: openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java?rev=1376805&r1=1376804&r2=1376805&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java (original)
+++ openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java Fri Aug 24 01:33:55 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.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java?rev=1376805&r1=1376804&r2=1376805&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java (original)
+++ openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java Fri Aug 24 01:33:55 2012
@@ -693,12 +693,19 @@ 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);
+ }
+ }
+
/**
* Runs <code>runnable</code> against all the anchors in the configuration
* pointed to by <code>opts</code>. Each invocation gets a fresh clone of