You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/10/13 15:41:05 UTC

[camel] branch main updated (29dc9334239 -> facf50d5575)

This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from 29dc9334239 (chores) ci: save test logs from core tests
     new 1612a7bb9b9 (chores) camel-twitter: avoid shadowing variables
     new 21cfaa1f9c3 (chores) camel-servlet: avoid shadowing variables
     new facf50d5575 (chores) camel-pdf: avoid shadowing variables

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/component/pdf/text/DefaultLineBuilderStrategy.java |  4 ++--
 .../org/apache/camel/component/servlet/ServletComponent.java | 11 ++++++-----
 .../camel/component/twitter/search/SearchProducer.java       | 12 ++++++------
 3 files changed, 14 insertions(+), 13 deletions(-)


[camel] 03/03: (chores) camel-pdf: avoid shadowing variables

Posted by or...@apache.org.
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 facf50d5575d6ced3a50841abc8f8e75c1e3d34f
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Oct 13 13:24:27 2022 +0200

    (chores) camel-pdf: avoid shadowing variables
---
 .../apache/camel/component/pdf/text/DefaultLineBuilderStrategy.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/text/DefaultLineBuilderStrategy.java b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/text/DefaultLineBuilderStrategy.java
index c8975a4a9f5..9c810ba10d6 100644
--- a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/text/DefaultLineBuilderStrategy.java
+++ b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/text/DefaultLineBuilderStrategy.java
@@ -144,9 +144,9 @@ public class DefaultLineBuilderStrategy implements LineBuilderStrategy {
         }
 
         public String buildLine() {
-            String line = this.line.toString();
+            String savedLine = this.line.toString();
             reset();
-            return line;
+            return savedLine;
         }
 
         public int getWordsCount() {


[camel] 01/03: (chores) camel-twitter: avoid shadowing variables

Posted by or...@apache.org.
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 1612a7bb9b95f414503368c1e89a8e0bb8556f38
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Oct 13 13:22:10 2022 +0200

    (chores) camel-twitter: avoid shadowing variables
---
 .../camel/component/twitter/search/SearchProducer.java       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/search/SearchProducer.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/search/SearchProducer.java
index 8fa54cb64b2..9de61b8a303 100644
--- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/search/SearchProducer.java
+++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/search/SearchProducer.java
@@ -50,16 +50,16 @@ public class SearchProducer extends DefaultProducer {
         long myLastId = lastId;
         // KEYWORDS
         // keywords from header take precedence
-        String keywords = exchange.getIn().getHeader(TwitterConstants.TWITTER_KEYWORDS, String.class);
-        if (keywords == null) {
-            keywords = this.keywords;
+        String queryKeywords = exchange.getIn().getHeader(TwitterConstants.TWITTER_KEYWORDS, String.class);
+        if (queryKeywords == null) {
+            queryKeywords = this.keywords;
         }
 
-        if (keywords == null) {
+        if (queryKeywords == null) {
             throw new CamelExchangeException("No keywords to use for query", exchange);
         }
 
-        Query query = new Query(keywords);
+        Query query = new Query(queryKeywords);
 
         // filter of older tweets
         if (endpoint.getProperties().isFilterOld() && myLastId != 0) {
@@ -107,7 +107,7 @@ public class SearchProducer extends DefaultProducer {
         }
 
         Twitter twitter = endpoint.getProperties().getTwitter();
-        LOG.debug("Searching twitter with keywords: {}", keywords);
+        LOG.debug("Searching twitter with keywords: {}", queryKeywords);
         QueryResult results = twitter.search(query);
         List<Status> list = results.getTweets();
 


[camel] 02/03: (chores) camel-servlet: avoid shadowing variables

Posted by or...@apache.org.
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 <an...@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());
         }