You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ra...@apache.org on 2020/01/16 03:01:18 UTC

[olingo-odata4] branch master updated: [OLINGO-1421]Handling incorrect message in UriHelperImpl

This is an automated email from the ASF dual-hosted git repository.

ramyav pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/olingo-odata4.git


The following commit(s) were added to refs/heads/master by this push:
     new a1dfb55  [OLINGO-1421]Handling incorrect message in UriHelperImpl
a1dfb55 is described below

commit a1dfb5596b4266f30ae503d3d3e116f269561640
Author: ramya vasanth <ra...@sap.com>
AuthorDate: Thu Jan 16 08:31:06 2020 +0530

    [OLINGO-1421]Handling incorrect message in UriHelperImpl
---
 .../org/apache/olingo/server/api/serializer/SerializerException.java    | 1 +
 .../src/main/java/org/apache/olingo/server/core/uri/UriHelperImpl.java  | 2 +-
 .../src/main/resources/server-core-exceptions-i18n.properties           | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/SerializerException.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/SerializerException.java
index ebb301b..bc6f0d7 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/SerializerException.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/SerializerException.java
@@ -52,6 +52,7 @@ public class SerializerException extends ODataLibraryException {
     UNKNOWN_TYPE,
     WRONG_BASE_TYPE,
     UNSUPPORTED_OPERATION_TYPE,
+    NULL_PROPERTY,
     /** parameter: encoding-name */
     UNSUPPORTED_ENCODING;
 
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriHelperImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriHelperImpl.java
index 2c19ade..1a13c32 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriHelperImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriHelperImpl.java
@@ -125,7 +125,7 @@ public class UriHelperImpl implements UriHelper {
      }
     if (prop == null) {
       throw new SerializerException("Key Value Cannot be null for property: " + propertyPath, 
-          SerializerException.MessageKeys.WRONG_PROPERTY_VALUE, propertyPath);
+          SerializerException.MessageKeys.NULL_PROPERTY, propertyPath);
     }
     return prop.getValue();
   }
diff --git a/lib/server-core/src/main/resources/server-core-exceptions-i18n.properties b/lib/server-core/src/main/resources/server-core-exceptions-i18n.properties
index a4be4ca..260f0d1 100644
--- a/lib/server-core/src/main/resources/server-core-exceptions-i18n.properties
+++ b/lib/server-core/src/main/resources/server-core-exceptions-i18n.properties
@@ -131,6 +131,7 @@ SerializerException.WRONG_PRIMITIVE_VALUE=The value '%2$s' is not valid for the
 SerializerException.UNKNOWN_TYPE=Type '%1s' not found in metadata.
 SerializerException.WRONG_BASE_TYPE=Type '%1s' is not derived from '%2s'.
 SerializerException.UNSUPPORTED_ENCODING=The encoding '%1s' is not supported.
+SerializerException.NULL_PROPERTY=The property '%1$s' is null.
 
 DeserializerException.NOT_IMPLEMENTED=The requested deserialization method has not been implemented yet.
 DeserializerException.IO_EXCEPTION=An I/O exception occurred.