Get the key from config only once as it is costly

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@618741 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2008-02-05 18:50:02 +00:00
parent de14ad6630
commit 24d2a42c22
1 changed files with 2 additions and 4 deletions

View File

@ -114,10 +114,8 @@ public abstract class AbstractBrokerFactory
* @since 1.1.0 * @since 1.1.0
*/ */
protected static Object toPoolKey(Map map) { protected static Object toPoolKey(Map map) {
if (Configurations.getProperty("Id", map) != null) Object key = Configurations.getProperty("Id", map);
return Configurations.getProperty("Id", map); return ( key != null) ? key : map;
else
return map;
} }
/** /**