You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2014/11/05 14:31:54 UTC

[4/9] git commit: [OLINGO-444] error from tech. service for property values not found

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

Change-Id: Id886548287a4e622cc0157c19343b2decf228cae

Signed-off-by: Michael Bolz <mi...@sap.com>


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/af464e2c
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/af464e2c
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/af464e2c

Branch: refs/heads/OLINGO-450_FunctionActionExecution
Commit: af464e2cab8d7dae16e9eed157acb9d1d8808147
Parents: d84f843
Author: Klaus Straubinger <kl...@sap.com>
Authored: Thu Oct 23 15:17:51 2014 +0200
Committer: Michael Bolz <mi...@sap.com>
Committed: Thu Oct 23 15:31:12 2014 +0200

----------------------------------------------------------------------
 .../olingo/server/tecsvc/processor/TechnicalProcessor.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/af464e2c/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalProcessor.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalProcessor.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalProcessor.java
index f05002e..383b889 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalProcessor.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalProcessor.java
@@ -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);