Issue #2906 fixed mapper no-value checks to do both null and empty set
fixed problem caused by previous change Former-commit-id:8599e6e782
[formerly23b83ee238
] [formerly1a45c23201
] [formerly1a45c23201
[formerly9e6da34150
]] [formerlyfe281381ab
[formerly1a45c23201
[formerly9e6da34150
] [formerlyfe281381ab
[formerly 6443a6546083068a3b626eec33eeafb4cf84c403]]]] Former-commit-id:fe281381ab
Former-commit-id: 03b1b0c15f1e2e528b4f55aa916da2252c812628 [formerly ade9cb87243cf6693cdfcc5064e979e69f6625ec] [formerly8140800517
[formerlyaf01ba2de6
]] Former-commit-id:8140800517
Former-commit-id:7ecb691bdf
This commit is contained in:
parent
c2ffc49c3b
commit
6456b0cc1d
1 changed files with 3 additions and 2 deletions
|
@ -55,6 +55,7 @@ import javax.xml.bind.Unmarshaller;
|
|||
* Mar 22, 2012 bsteffen Initial creation
|
||||
* Apr 02, 2014 2906 bclement changed to return empty set instead of null for lookup methods
|
||||
* Apr 02, 2014 2906 bclement fixed not checking for empty set in lookupAliases()
|
||||
* and in lookupAliasOrNull()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -299,7 +300,7 @@ public abstract class Mapper {
|
|||
public String lookupBaseNameOrNull(String alias, String namespace)
|
||||
throws MultipleMappingException {
|
||||
Set<String> baseNames = lookupBaseNamesOrEmpty(alias, namespace);
|
||||
if (baseNames.isEmpty()) {
|
||||
if (baseNames == null || baseNames.isEmpty()) {
|
||||
return null;
|
||||
} else if (baseNames.size() == 1) {
|
||||
return baseNames.iterator().next();
|
||||
|
@ -322,7 +323,7 @@ public abstract class Mapper {
|
|||
public String lookupAliasOrNull(String base, String namespace)
|
||||
throws MultipleMappingException {
|
||||
Set<String> aliases = lookupAliasesOrEmpty(base, namespace);
|
||||
if (aliases == null) {
|
||||
if (aliases == null || aliases.isEmpty()) {
|
||||
return null;
|
||||
} else if (aliases.size() == 1) {
|
||||
return aliases.iterator().next();
|
||||
|
|
Loading…
Add table
Reference in a new issue