OLINGO-1112: checking the key values for null when building the location URL in the response
This commit is contained in:
parent
c85b6a6239
commit
004515aaee
|
@ -215,6 +215,10 @@ public class EntityResponse extends ServiceResponse {
|
||||||
String propertyType = entity.getProperty(key).getType();
|
String propertyType = entity.getProperty(key).getType();
|
||||||
Object propertyValue = entity.getProperty(key).getValue();
|
Object propertyValue = entity.getProperty(key).getValue();
|
||||||
|
|
||||||
|
if (propertyValue == null) {
|
||||||
|
throw new EdmPrimitiveTypeException("The key value for property "+key+" is invalid; Key value cannot be null");
|
||||||
|
}
|
||||||
|
|
||||||
if(propertyType.startsWith("Edm.")) {
|
if(propertyType.startsWith("Edm.")) {
|
||||||
propertyType = propertyType.substring(4);
|
propertyType = propertyType.substring(4);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue