[OLINGO-1421]Handling incorrect message in UriHelperImpl
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 @@
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 @@
}
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.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.