You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/09/26 07:22:10 UTC
[camel] branch master updated: Camel-restlet: use equals in the
method comparison for POST and PUT, more OSGI-friendly
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 7bd4a0f Camel-restlet: use equals in the method comparison for POST and PUT, more OSGI-friendly
7bd4a0f is described below
commit 7bd4a0f66eac727fc187a62ccfdc318481455f16
Author: Andrea Cosentino <an...@gmail.com>
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 31faf62..195e394 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);