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 2016/01/25 21:31:29 UTC

[49/51] [abbrv] olingo-odata4 git commit: OLINGO-853: correcting the encoding behavior as I reverted the change in EdmString from OLINGO-854, this will also localize the change to this perticular method

OLINGO-853: correcting the encoding behavior as I reverted the change in EdmString from OLINGO-854, this will also localize the change to this perticular method


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

Branch: refs/heads/OLINGO-832_StreamSerializerPoC
Commit: b9512eda4b42ac75cf5880428cdc45746473b1cd
Parents: 322085d
Author: Ramesh Reddy <ra...@jboss.org>
Authored: Fri Jan 22 11:45:06 2016 -0600
Committer: Ramesh Reddy <ra...@jboss.org>
Committed: Fri Jan 22 11:45:06 2016 -0600

----------------------------------------------------------------------
 .../org/apache/olingo/server/core/responses/EntityResponse.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b9512eda/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/EntityResponse.java
----------------------------------------------------------------------
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 064ad6f..a0bbd14 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
@@ -29,6 +29,7 @@ import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.commons.api.http.HttpHeader;
 import org.apache.olingo.commons.api.http.HttpStatusCode;
+import org.apache.olingo.commons.core.Encoder;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmString;
 import org.apache.olingo.server.api.ODataApplicationException;
@@ -199,7 +200,7 @@ public class EntityResponse extends ServiceResponse {
       String value =  EdmPrimitiveTypeFactory.getInstance(kind).valueToString(
           propertyValue, true, 4000, 0, 0, true);
       if (kind == EdmPrimitiveTypeKind.String) {
-          value = EdmString.getInstance().toUriLiteral(value);
+          value = EdmString.getInstance().toUriLiteral(Encoder.encode(value));
       }
       location.append(value);
     }