diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidator.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidator.java index 32fc690c1..b66856dfd 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidator.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidator.java @@ -84,7 +84,6 @@ public class UriValidator { /* PUT 0 */ { false , false , false , false, false , false , false , false , false , false , false , false }, /* DELETE 0 */ { false , false , false , false, false , false, false , false, false , false , false, false }, /* PATCH 0 */ { false , false , false , false, false , false , false , false , false , false , false , false }, - /* MERGE 0 */ { false , false , false , false, false , false , false , false , false , false , false , false }, }; //CHECKSTYLE:ON @@ -154,8 +153,7 @@ public class UriValidator { POST(1), PUT(2), DELETE(3), - MERGE(4), - PATCH(5); + PATCH(4); private int idx; @@ -602,9 +600,6 @@ public class UriValidator { case PATCH: idx = RowIndexForHttpMethod.PATCH; break; - case MERGE: - idx = RowIndexForHttpMethod.MERGE; - break; default: throw new UriValidationException("HTTP method not supported: " + httpMethod, UriValidationException.MessageKeys.UNSUPPORTED_HTTP_METHOD, httpMethod.toString()); diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/ODataHttpHandlerImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/ODataHttpHandlerImplTest.java index a81af6877..8200c320c 100644 --- a/lib/server-core/src/test/java/org/apache/olingo/server/core/ODataHttpHandlerImplTest.java +++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/ODataHttpHandlerImplTest.java @@ -38,7 +38,6 @@ public class ODataHttpHandlerImplTest { { "GET", null, null, "GET" }, { "GET", "xxx", "yyy", "GET" }, { "PUT", "xxx", "yyy", "PUT" }, - { "MERGE", "xxx", "yyy", "MERGE" }, { "DELETE", "xxx", "yyy", "DELETE" }, { "PATCH", "xxx", "yyy", "PATCH" }, @@ -47,7 +46,7 @@ public class ODataHttpHandlerImplTest { { "POST", null, "PATCH", "PATCH" }, { "POST", "GET", null, "GET" }, - { "POST", "MERGE", null, "MERGE" }, + { "POST", "PATCH", null, "PATCH" }, { "POST", "GET", "GET", "GET" }, }; @@ -71,7 +70,7 @@ public class ODataHttpHandlerImplTest { public void extractMethodFail() throws Exception { String[][] mm = { { "POST", "bla", null }, - { "POST", "MERGE", "PATCH" }, + { "POST", "PUT", "PATCH" }, { "OPTIONS", null, null }, { "HEAD", null, null }, }; diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java index f49b4d47e..878584514 100644 --- a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java +++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java @@ -77,7 +77,6 @@ public class ODataHandlerTest { dispatchMethodNotAllowed(HttpMethod.POST, "/", processor); dispatchMethodNotAllowed(HttpMethod.PUT, "/", processor); dispatchMethodNotAllowed(HttpMethod.PATCH, "/", processor); - dispatchMethodNotAllowed(HttpMethod.MERGE, "/", processor); dispatchMethodNotAllowed(HttpMethod.DELETE, "/", processor); } @@ -116,7 +115,6 @@ public class ODataHandlerTest { dispatchMethodNotAllowed(HttpMethod.POST, "$metadata", processor); dispatchMethodNotAllowed(HttpMethod.PUT, "$metadata", processor); dispatchMethodNotAllowed(HttpMethod.PATCH, "$metadata", processor); - dispatchMethodNotAllowed(HttpMethod.MERGE, "$metadata", processor); dispatchMethodNotAllowed(HttpMethod.DELETE, "$metadata", processor); } diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/validator/UriValidatorTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/validator/UriValidatorTest.java index 02b51b1bc..7a5c692ce 100644 --- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/validator/UriValidatorTest.java +++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/validator/UriValidatorTest.java @@ -266,7 +266,6 @@ public class UriValidatorTest { validator.validate(uri, HttpMethod.PUT); validator.validate(uri, HttpMethod.DELETE); validator.validate(uri, HttpMethod.PATCH); - validator.validate(uri, HttpMethod.MERGE); } @Test