mirror of https://github.com/apache/openjpa.git
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:
parent
5e5babb38c
commit
fb42b621b3
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue