This is an automated email from the ASF dual-hosted git repository.

ramyav pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/olingo-odata2.git


The following commit(s) were added to refs/heads/master by this push:
     new a941f16  [OLINGO-1322]An empty string validation in UriParser
a941f16 is described below

commit a941f16db247d3988d6e94f4a9c8775ccb4f0884
Author: ramya vasanth <[email protected]>
AuthorDate: Thu May 23 14:20:54 2019 +0530

    [OLINGO-1322]An empty string validation in UriParser
---
 .../main/java/org/apache/olingo/odata2/core/uri/UriParserImpl.java   | 4 ----
 .../test/java/org/apache/olingo/odata2/core/uri/UriParserTest.java   | 5 -----
 2 files changed, 9 deletions(-)

diff --git 
a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/uri/UriParserImpl.java
 
b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/uri/UriParserImpl.java
index 3a31ad7..a49e7c1 100644
--- 
a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/uri/UriParserImpl.java
+++ 
b/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/uri/UriParserImpl.java
@@ -469,10 +469,6 @@ public class UriParserImpl extends UriParser {
         }
       }
       
-      if("''".equals(value) || value==null){
-        throw new 
UriSyntaxException(UriSyntaxException.INVALIDVALUE.addContent(value));
-      }
-
       EdmProperty keyProperty = null;
       for (final EdmProperty testKeyProperty : keyProperties) {
         if (testKeyProperty.getName().equals(name)) {
diff --git 
a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/uri/UriParserTest.java
 
b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/uri/UriParserTest.java
index 51a2669..5896cfe 100644
--- 
a/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/uri/UriParserTest.java
+++ 
b/odata2-lib/odata-core/src/test/java/org/apache/olingo/odata2/core/uri/UriParserTest.java
@@ -256,11 +256,6 @@ public class UriParserTest extends BaseTest {
   }
   
   @Test
-  public void parseEmployeesEntityWithEmptyKey() throws Exception {
-    parseWrongUri("/Employees('')", 
UriSyntaxException.INVALIDVALUE.addContent("''"));
-  }
-  
-  @Test
   public void parseEmployeesEntityWithNullKey() throws Exception {
     parseWrongUri("/Employees(null)", UriSyntaxException.INCOMPATIBLELITERAL);
   }

Reply via email to