OLINGO-960: returning null on the missing alias value in query

This commit is contained in:
Ramesh Reddy 2016-05-23 15:04:37 -05:00
parent 96c3f8903f
commit 2675f8fa01
2 changed files with 4 additions and 5 deletions

View File

@ -339,8 +339,7 @@ public class ExpressionParser {
return new AliasImpl(name,
ParserHelper.parseAliasValue(name, null, true, true, edm, referringType, aliases));
} else {
throw new UriValidationException("Alias '" + name + "' not found.",
UriValidationException.MessageKeys.MISSING_ALIAS, name);
return new AliasImpl(name, null);
}
}

View File

@ -5846,11 +5846,11 @@ public class TestFullResourcePath {
testUri.runEx("ESAllPrim(PropertyInt16=@p1)", "@p1='ewe")
.isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX);
testFilter.runOnETKeyNavEx("PropertyInt16 gt @alias")
.isExValidation(UriValidationException.MessageKeys.MISSING_ALIAS);
.isInAliasToValueMap("@alias", null);
testFilter.runOnETKeyNavEx("PropertyInt16 gt @alias&@alias=@alias")
.isExValidation(UriValidationException.MessageKeys.MISSING_ALIAS);
.isInAliasToValueMap("@alias", "@alias");
testFilter.runOnETKeyNavEx("@alias&@alias=@alias2&@alias2=true or @alias")
.isExValidation(UriValidationException.MessageKeys.MISSING_ALIAS);
.isInAliasToValueMap("@alias", "@alias2");
}
@Test