OLINGO-1194: Correcting the EntityResponse class to use correct property facets to generate valueToString

This commit is contained in:
Ramesh Reddy 2018-08-03 11:17:41 -05:00
parent 243708f168
commit c2c5111a62
1 changed files with 2 additions and 1 deletions

View File

@ -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));
}