olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [48/51] [abbrv] olingo-odata4 git commit: OLINGO-854: reverting the changes from previous commit
Date Mon, 25 Jan 2016 20:31:28 GMT
OLINGO-854: reverting the changes from previous commit


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

Branch: refs/heads/OLINGO-832_StreamSerializerPoC
Commit: 322085df6b9bf706ffd4f37eed9ec4e304a91999
Parents: b5eae4f
Author: Ramesh Reddy <rareddy@jboss.org>
Authored: Fri Jan 22 11:33:06 2016 -0600
Committer: Ramesh Reddy <rareddy@jboss.org>
Committed: Fri Jan 22 11:36:29 2016 -0600

----------------------------------------------------------------------
 .../olingo/commons/core/edm/primitivetype/EdmString.java       | 6 ++----
 .../olingo/commons/core/edm/primitivetype/EdmStringTest.java   | 2 --
 2 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/322085df/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.java
b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.java
index a63010b..8e9a42a 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmString.java
@@ -21,8 +21,6 @@ package org.apache.olingo.commons.core.edm.primitivetype;
 import java.util.regex.Pattern;
 
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
-import org.apache.olingo.commons.core.Decoder;
-import org.apache.olingo.commons.core.Encoder;
 
 /**
  * Implementation of the EDM primitive type String.
@@ -97,11 +95,11 @@ public final class EdmString extends SingletonPrimitiveType {
       uriLiteral.append(c);
     }
     uriLiteral.append(uriSuffix);
-    return Encoder.encode(uriLiteral.toString());
+    return uriLiteral.toString();
   }
 
   @Override
   public String fromUriLiteral(final String literal) throws EdmPrimitiveTypeException {
-    return literal == null ? null : Decoder.decode(super.fromUriLiteral(literal).replace("''",
"'"));
+    return literal == null ? null : super.fromUriLiteral(literal).replace("''", "'");
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/322085df/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStringTest.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStringTest.java
b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStringTest.java
index 1035e6b..b5f2a89 100644
--- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStringTest.java
+++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/edm/primitivetype/EdmStringTest.java
@@ -33,13 +33,11 @@ public class EdmStringTest extends PrimitiveTypeBaseTest {
     assertEquals("'StringValue'", instance.toUriLiteral("StringValue"));
     assertEquals("'String''Value'", instance.toUriLiteral("String'Value"));
     assertEquals("'String''''''Value'", instance.toUriLiteral("String'''Value"));
-    assertEquals("'ab%20cd%20'", instance.toUriLiteral("ab cd "));
   }
 
   @Test
   public void fromUriLiteral() throws Exception {
     assertEquals("String''Value", instance.fromUriLiteral("'String''''Value'"));
-    assertEquals("ab cd ", instance.fromUriLiteral("'ab%20cd%20'"));
 
     expectErrorInFromUriLiteral(instance, "");
     expectErrorInFromUriLiteral(instance, "'");


Mime
View raw message