openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r897269 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
Date Fri, 08 Jan 2010 17:24:01 GMT
Author: dwoods
Date: Fri Jan  8 17:23:24 2010
New Revision: 897269

URL: http://svn.apache.org/viewvc?rev=897269&view=rev
Log:
OPENJPA-1452 Configurations attempts to modiy an umodifiable map.  Patch contributed by JIRA
uid baboune.

Modified:
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java?rev=897269&r1=897268&r2=897269&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
Fri Jan  8 17:23:24 2010
@@ -675,10 +675,10 @@
      * possible configuration prefix.
      */
     public static Object removeProperty(String partialKey, Map props) {
-        if (partialKey == null || props == null || props.isEmpty())
-            return null;
-        String fullKey = ProductDerivations.getConfigurationKey(partialKey, props);
-        return props.remove(fullKey);
+ 	if (containsProperty(partialKey, props))
+	    return props.remove(ProductDerivations.getConfigurationKey(partialKey, props));
+	else 
+	    return null;
     }
 
     /**



Mime
View raw message