OLINGO-960: returning null on the missing alias value in query
This commit is contained in:
parent
96c3f8903f
commit
2675f8fa01
|
@ -339,8 +339,7 @@ public class ExpressionParser {
|
||||||
return new AliasImpl(name,
|
return new AliasImpl(name,
|
||||||
ParserHelper.parseAliasValue(name, null, true, true, edm, referringType, aliases));
|
ParserHelper.parseAliasValue(name, null, true, true, edm, referringType, aliases));
|
||||||
} else {
|
} else {
|
||||||
throw new UriValidationException("Alias '" + name + "' not found.",
|
return new AliasImpl(name, null);
|
||||||
UriValidationException.MessageKeys.MISSING_ALIAS, name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5846,11 +5846,11 @@ public class TestFullResourcePath {
|
||||||
testUri.runEx("ESAllPrim(PropertyInt16=@p1)", "@p1='ewe")
|
testUri.runEx("ESAllPrim(PropertyInt16=@p1)", "@p1='ewe")
|
||||||
.isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX);
|
.isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX);
|
||||||
testFilter.runOnETKeyNavEx("PropertyInt16 gt @alias")
|
testFilter.runOnETKeyNavEx("PropertyInt16 gt @alias")
|
||||||
.isExValidation(UriValidationException.MessageKeys.MISSING_ALIAS);
|
.isInAliasToValueMap("@alias", null);
|
||||||
testFilter.runOnETKeyNavEx("PropertyInt16 gt @alias&@alias=@alias")
|
testFilter.runOnETKeyNavEx("PropertyInt16 gt @alias&@alias=@alias")
|
||||||
.isExValidation(UriValidationException.MessageKeys.MISSING_ALIAS);
|
.isInAliasToValueMap("@alias", "@alias");
|
||||||
testFilter.runOnETKeyNavEx("@alias&@alias=@alias2&@alias2=true or @alias")
|
testFilter.runOnETKeyNavEx("@alias&@alias=@alias2&@alias2=true or @alias")
|
||||||
.isExValidation(UriValidationException.MessageKeys.MISSING_ALIAS);
|
.isInAliasToValueMap("@alias", "@alias2");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue