OPENJPA-1452 Configurations attempts to modiy an umodifiable map. Patch contributed by JIRA uid baboune.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@897269 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2010-01-08 17:23:24 +00:00
parent e303892e2a
commit 6710465b7c

View File

@ -675,10 +675,10 @@ public class Configurations {
* possible configuration prefix. * possible configuration prefix.
*/ */
public static Object removeProperty(String partialKey, Map props) { public static Object removeProperty(String partialKey, Map props) {
if (partialKey == null || props == null || props.isEmpty()) if (containsProperty(partialKey, props))
return null; return props.remove(ProductDerivations.getConfigurationKey(partialKey, props));
String fullKey = ProductDerivations.getConfigurationKey(partialKey, props); else
return props.remove(fullKey); return null;
} }
/** /**