From c2c5111a6231850a141c0b09bc2cb8cdb1122a59 Mon Sep 17 00:00:00 2001 From: Ramesh Reddy Date: Fri, 3 Aug 2018 11:17:41 -0500 Subject: [PATCH] OLINGO-1194: Correcting the EntityResponse class to use correct property facets to generate valueToString --- .../apache/olingo/server/core/responses/EntityResponse.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/EntityResponse.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/EntityResponse.java index 55008f997..4b8cad39a 100644 --- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/EntityResponse.java +++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/EntityResponse.java @@ -224,7 +224,8 @@ public class EntityResponse extends ServiceResponse { } EdmPrimitiveTypeKind kind = EdmPrimitiveTypeKind.valueOf(propertyType); String value = EdmPrimitiveTypeFactory.getInstance(kind).valueToString( - propertyValue, true, property.getMaxLength(), property.getPrecision(), property.getScale(), true); + propertyValue, property.isNullable(), property.getMaxLength(), property.getPrecision(), property.getScale(), + property.isUnicode()); if (kind == EdmPrimitiveTypeKind.String) { value = EdmString.getInstance().toUriLiteral(Encoder.encode(value)); }