You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pa...@apache.org on 2019/12/25 11:40:43 UTC

[camel] branch master updated (f2eb1b3 -> d6f999a)

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

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


    from f2eb1b3  Remove useless type tests identified by lgtm.com.
     new abbf817  Use primitive types for variables that are never assigned null (as suggested by lgtm.com).
     new d6f999a  Upgrade PDFBox to version 2.0.18

The 2 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:
 .../apache/camel/component/cxf/jaxrs/CxfRsProducer.java  |  8 ++++----
 .../org/apache/camel/component/file/FileEndpoint.java    | 16 ++++++++--------
 .../apache/camel/component/file/GenericFileProducer.java |  2 +-
 parent/pom.xml                                           |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)


[camel] 01/02: Use primitive types for variables that are never assigned null (as suggested by lgtm.com).

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit abbf817f05971772ac0744d807c8a7dc539e68f7
Author: Pascal Schumacher <pa...@gmx.net>
AuthorDate: Wed Dec 25 12:33:19 2019 +0100

    Use primitive types for variables that are never assigned null (as suggested by lgtm.com).
---
 .../apache/camel/component/cxf/jaxrs/CxfRsProducer.java  |  8 ++++----
 .../org/apache/camel/component/file/FileEndpoint.java    | 16 ++++++++--------
 .../apache/camel/component/file/GenericFileProducer.java |  2 +-
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
index 175635e..c3c1c95 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
@@ -361,7 +361,7 @@ public class CxfRsProducer extends DefaultAsyncProducer {
         //http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
         if (throwException) {
             if (response instanceof Response) {
-                Integer respCode = ((Response) response).getStatus();
+                int respCode = ((Response) response).getStatus();
                 if (respCode > 207) {
                     throw populateCxfRsProducerException(exchange, (Response) response, respCode);
                 }
@@ -455,7 +455,7 @@ public class CxfRsProducer extends DefaultAsyncProducer {
         saveCookies(exchange, target, cookieHandler);
         if (throwException) {
             if (response instanceof Response) {
-                Integer respCode = ((Response) response).getStatus();
+                int respCode = ((Response) response).getStatus();
                 if (respCode > 207) {
                     throw populateCxfRsProducerException(exchange, (Response) response, respCode);
                 }
@@ -737,7 +737,7 @@ public class CxfRsProducer extends DefaultAsyncProducer {
             //Throw exception on a response > 207
             //http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
             if (response != null && throwException) {
-                Integer respCode = response.getStatus();
+                int respCode = response.getStatus();
                 if (respCode > 207) {
                     return true;
                 }
@@ -833,7 +833,7 @@ public class CxfRsProducer extends DefaultAsyncProducer {
             //Throw exception on a response > 207
             //http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
             if (response != null && throwException) {
-                Integer respCode = response.getStatus();
+                int respCode = response.getStatus();
                 if (respCode > 207) {
                     return true;
                 }
diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java b/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
index 29fe0a1..e1b70f5 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
@@ -350,8 +350,8 @@ public class FileEndpoint extends GenericFileEndpoint<File> {
         }
         String permissionsString = chmod.trim().substring(chmod.length() - 3);  // if 4 digits chop off leading one
         for (int i = 0; i < permissionsString.length(); i++) {
-            Character c = permissionsString.charAt(i);
-            if (!Character.isDigit(c) || Integer.parseInt(c.toString()) > 7) {
+            char c = permissionsString.charAt(i);
+            if (!Character.isDigit(c) || c > 7) {
                 return false;
             }
         }
@@ -366,9 +366,9 @@ public class FileEndpoint extends GenericFileEndpoint<File> {
 
         String chmodString = chmod.substring(chmod.length() - 3);  // if 4 digits chop off leading one
 
-        Integer ownerValue = Integer.parseInt(chmodString.substring(0, 1));
-        Integer groupValue = Integer.parseInt(chmodString.substring(1, 2));
-        Integer othersValue = Integer.parseInt(chmodString.substring(2, 3));
+        int ownerValue = Integer.parseInt(chmodString.substring(0, 1));
+        int groupValue = Integer.parseInt(chmodString.substring(1, 2));
+        int othersValue = Integer.parseInt(chmodString.substring(2, 3));
 
         if ((ownerValue & CHMOD_WRITE_MASK) > 0) {
             permissions.add(PosixFilePermission.OWNER_WRITE);
@@ -427,9 +427,9 @@ public class FileEndpoint extends GenericFileEndpoint<File> {
 
         String chmodString = chmodDirectory.substring(chmodDirectory.length() - 3);  // if 4 digits chop off leading one
 
-        Integer ownerValue = Integer.parseInt(chmodString.substring(0, 1));
-        Integer groupValue = Integer.parseInt(chmodString.substring(1, 2));
-        Integer othersValue = Integer.parseInt(chmodString.substring(2, 3));
+        int ownerValue = Integer.parseInt(chmodString.substring(0, 1));
+        int groupValue = Integer.parseInt(chmodString.substring(1, 2));
+        int othersValue = Integer.parseInt(chmodString.substring(2, 3));
 
         if ((ownerValue & CHMOD_WRITE_MASK) > 0) {
             permissions.add(PosixFilePermission.OWNER_WRITE);
diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileProducer.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
index 8b76aa3..8e187db 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
@@ -112,7 +112,7 @@ public class GenericFileProducer<T> extends DefaultProducer {
             boolean writeAsTempAndRename = ObjectHelper.isNotEmpty(endpoint.getTempFileName());
             String tempTarget = null;
             // remember if target exists to avoid checking twice
-            Boolean targetExists;
+            boolean targetExists;
             if (writeAsTempAndRename) {
                 // compute temporary name with the temp prefix
                 tempTarget = createTempFileName(exchange, target);


[camel] 02/02: Upgrade PDFBox to version 2.0.18

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d6f999a29eedeeeb0b420b7dbbbc7346a287563d
Author: Pascal Schumacher <pa...@gmx.net>
AuthorDate: Wed Dec 25 12:40:26 2019 +0100

    Upgrade PDFBox to version 2.0.18
---
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index fd5fad5..726ab69 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -518,7 +518,7 @@
         <pax-exam-version>4.13.1</pax-exam-version>
         <pax-tiny-bundle-version>1.3.2</pax-tiny-bundle-version>
         <pax-logging-version>1.11.2</pax-logging-version>
-        <pdfbox-version>2.0.17</pdfbox-version>
+        <pdfbox-version>2.0.18</pdfbox-version>
         <perfmark-version>0.17.0</perfmark-version>
         <pgjdbc-driver-version>42.2.6</pgjdbc-driver-version>
         <pgjdbc-ng-driver-version>0.8.3</pgjdbc-ng-driver-version>