avoid duplicate alias key-value pairs. We really need to move this aliasing system to a map at some point.

git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@454053 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2006-10-08 00:55:35 +00:00
parent 5e5babb38c
commit fb42b621b3
1 changed files with 6 additions and 2 deletions

View File

@ -50,8 +50,12 @@ public class BrokerFactoryValue
* of default aliases for new values created after this invocation.
*/
public static void addDefaultAlias(String alias, String cls) {
_aliases.add(alias);
_aliases.add(cls);
if (_aliases.contains(alias)) {
_aliases.set(_aliases.indexOf(alias), cls);
} else {
_aliases.add(alias);
_aliases.add(cls);
}
}
/**