CAMEL-9635: Fixed CS. This closes #857.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ed5790bd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ed5790bd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ed5790bd Branch: refs/heads/camel-2.16.x Commit: ed5790bd92ea6a3735d19924ba3d17c85fcaf6ed Parents: a904004 Author: Claus Ibsen <davscl...@apache.org> Authored: Wed Feb 24 17:39:26 2016 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Wed Feb 24 18:02:25 2016 +0100 ---------------------------------------------------------------------- .../camel/component/jetty/CamelContinuationServlet.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/ed5790bd/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/CamelContinuationServlet.java ---------------------------------------------------------------------- diff --git a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/CamelContinuationServlet.java b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/CamelContinuationServlet.java index 0038a98..a6a2e9c 100644 --- a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/CamelContinuationServlet.java +++ b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/CamelContinuationServlet.java @@ -64,6 +64,8 @@ public class CamelContinuationServlet extends CamelServlet { response.sendError(HttpServletResponse.SC_NOT_FOUND); return; } + + // figure out if continuation is enabled and what timeout to use boolean useContinuation = false; Long continuationTimeout = null; HttpCommonEndpoint endpoint = consumer.getEndpoint(); @@ -72,24 +74,23 @@ public class CamelContinuationServlet extends CamelServlet { Boolean epUseContinuation = jettyEndpoint.getUseContinuation(); Long epContinuationTimeout = jettyEndpoint.getContinuationTimeout(); if (epUseContinuation != null) { - useContinuation = epUseContinuation.booleanValue(); + useContinuation = epUseContinuation; } else { useContinuation = jettyEndpoint.getComponent().isUseContinuation(); } - if(epContinuationTimeout != null) { + if (epContinuationTimeout != null) { continuationTimeout = epContinuationTimeout; } else { continuationTimeout = jettyEndpoint.getComponent().getContinuationTimeout(); } } if (useContinuation) { - log.trace("Start request with continuation timeout of {}", continuationTimeout!= null?continuationTimeout:"jetty default"); + log.trace("Start request with continuation timeout of {}", continuationTimeout != null ? continuationTimeout : "jetty default"); } else { - log.trace("Usage of continuation is disabled, either by component or endpoint configuration, fall back to normal servlet processing instead"); + log.trace("Usage of continuation is disabled, either by component or endpoint configuration, fallback to normal servlet processing instead"); super.service(request, response); return; } - if (consumer.getEndpoint().getHttpMethodRestrict() != null) { Iterator<?> it = ObjectHelper.createIterable(consumer.getEndpoint().getHttpMethodRestrict()).iterator();