This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 21cfaa1f9c371b8f34298956c92b841111c320e5 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Thu Oct 13 13:23:12 2022 +0200 (chores) camel-servlet: avoid shadowing variables --- .../org/apache/camel/component/servlet/ServletComponent.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java b/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java index 98611d1f91b..abe2f0526dd 100644 --- a/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java +++ b/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java @@ -80,12 +80,13 @@ public class ServletComponent extends HttpCommonComponent implements RestConsume Boolean bridgeEndpoint = getAndRemoveParameter(parameters, "bridgeEndpoint", Boolean.class); HttpBinding binding = resolveAndRemoveReferenceParameter(parameters, "httpBinding", HttpBinding.class); Boolean matchOnUriPrefix = getAndRemoveParameter(parameters, "matchOnUriPrefix", Boolean.class); - String servletName = getAndRemoveParameter(parameters, "servletName", String.class, getServletName()); + String filteredServletName = getAndRemoveParameter(parameters, "servletName", String.class, getServletName()); String httpMethodRestrict = getAndRemoveParameter(parameters, "httpMethodRestrict", String.class); HeaderFilterStrategy headerFilterStrategy = resolveAndRemoveReferenceParameter(parameters, "headerFilterStrategy", HeaderFilterStrategy.class); Boolean async = getAndRemoveParameter(parameters, "async", Boolean.class); - Boolean attachmentMultipartBinding = getAndRemoveParameter(parameters, "attachmentMultipartBinding", Boolean.class); + Boolean filteredAttachmentMultipartBinding + = getAndRemoveParameter(parameters, "attachmentMultipartBinding", Boolean.class); Boolean disableStreamCache = getAndRemoveParameter(parameters, "disableStreamCache", Boolean.class); if (lenientContextPath()) { @@ -105,7 +106,7 @@ public class ServletComponent extends HttpCommonComponent implements RestConsume URI httpUri = URISupport.createRemainingURI(new URI(UnsafeUriCharactersEncoder.encodeHttpURI(uri)), parameters); ServletEndpoint endpoint = createServletEndpoint(uri, this, httpUri); - endpoint.setServletName(servletName); + endpoint.setServletName(filteredServletName); endpoint.setFileNameExtWhitelist(fileNameExtWhitelist); if (async != null) { endpoint.setAsync(async); @@ -142,8 +143,8 @@ public class ServletComponent extends HttpCommonComponent implements RestConsume if (httpMethodRestrict != null) { endpoint.setHttpMethodRestrict(httpMethodRestrict); } - if (attachmentMultipartBinding != null) { - endpoint.setAttachmentMultipartBinding(attachmentMultipartBinding); + if (filteredAttachmentMultipartBinding != null) { + endpoint.setAttachmentMultipartBinding(filteredAttachmentMultipartBinding); } else { endpoint.setAttachmentMultipartBinding(isAttachmentMultipartBinding()); }