This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.22.x by this push:
new d0f51f0 Camel-restlet: use equals in the method comparison for POST
and PUT, more OSGI-friendly
d0f51f0 is described below
commit d0f51f02c9b50285a305b2124a299e3fcae9242f
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Sep 26 09:18:57 2018 +0200
Camel-restlet: use equals in the method comparison for POST and PUT, more
OSGI-friendly
---
.../java/org/apache/camel/component/restlet/DefaultRestletBinding.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index 0182790..ada7f2f 100644
---
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -287,7 +287,7 @@ public class DefaultRestletBinding implements
RestletBinding, HeaderFilterStrate
LOG.debug("Populate Restlet {} request from exchange body as form
using media type {}", method, mediaType);
} else {
// include body if PUT or POST
- if (request.getMethod() == Method.PUT || request.getMethod() ==
Method.POST) {
+ if (request.getMethod().equals(Method.PUT) ||
request.getMethod().equals(Method.POST)) {
Representation body = createRepresentationFromBody(exchange,
mediaType);
request.setEntity(body);
LOG.debug("Populate Restlet {} request from exchange body: {}
using media type {}", method, body, mediaType);