[OLINGO-444] error from tech. service for property values not found

Change-Id: Id886548287a4e622cc0157c19343b2decf228cae

Signed-off-by: Michael Bolz <michael.bolz@sap.com>
This commit is contained in:
Klaus Straubinger 2014-10-23 15:17:51 +02:00 committed by Michael Bolz
parent d84f843f22
commit af464e2cab
1 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ public class TechnicalProcessor implements EntitySetProcessor, EntityProcessor,
final EdmProperty edmProperty = uriProperty.getProperty();
final Property property = entity.getProperty(edmProperty.getName());
if (property == null) {
response.setStatusCode(HttpStatusCode.NOT_FOUND.getStatusCode());
throw new ODataApplicationException("Nothing found.", HttpStatusCode.NOT_FOUND.getStatusCode(), Locale.ROOT);
} else {
if (property.getValue() == null) {
response.setStatusCode(HttpStatusCode.NO_CONTENT.getStatusCode());
@ -272,7 +272,7 @@ public class TechnicalProcessor implements EntitySetProcessor, EntityProcessor,
final EdmEntitySet edmEntitySet = getEdmEntitySet(uriInfo.asUriInfoResource());
final Entity entity = readEntityInternal(uriInfo.asUriInfoResource(), edmEntitySet);
if (entity == null) {
response.setStatusCode(HttpStatusCode.NOT_FOUND.getStatusCode());
throw new ODataApplicationException("Nothing found.", HttpStatusCode.NOT_FOUND.getStatusCode(), Locale.ROOT);
} else {
final UriResourceProperty uriProperty =
(UriResourceProperty) uriInfo.getUriResourceParts().get(uriInfo.getUriResourceParts().size() - 2);