dk2k commented on a change in pull request #5842:
URL: https://github.com/apache/camel/pull/5842#discussion_r672209489



##########
File path: 
components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConsumer.java
##########
@@ -188,8 +188,12 @@ protected void configureConsumer(String eventListenerType, 
InternalRuntimeManage
             return;
         }
 
-        LOGGER.debug("Adding consumer {} on {}", consumer, consumerAware);
-        consumerAware.addConsumer(consumer);
+        if (consumerAware != null) {
+            LOGGER.debug("Adding consumer {} on {}", consumer, consumerAware);
+            consumerAware.addConsumer(consumer);
+        } else {
+            LOGGER.error("null in consumerAware");

Review comment:
       Please tell me how to make it more descriptive

##########
File path: 
components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
##########
@@ -214,7 +214,10 @@ public void processMultiPart(final Exchange exchange) 
throws Exception {
 
                 LOG.trace("Uploading part [{}] for {}", part, keyName);
                 try (InputStream fileInputStream = new 
FileInputStream(filePayload)) {
-                    fileInputStream.skip(filePosition);
+                    long skipped = fileInputStream.skip(filePosition);
+                    if (skipped == 0) {
+                        LOG.warn("0 bytes skipped");

Review comment:
       thanks, got it!

##########
File path: 
components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
##########
@@ -524,7 +524,10 @@ private boolean 
retrieveFileToFileInLocalWorkDirectory(String name, Exchange exc
             local = new File(local, relativeName);
 
             // create directory to local work file
-            local.mkdirs();
+            boolean result = local.mkdirs();
+            if (!result) {
+                log.error("mkdirs() failed for " + local);

Review comment:
       Thanks again!

##########
File path: 
components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsNormalFileHandler.java
##########
@@ -152,7 +155,10 @@ private File getHdfsFileToTmpFile(String hdfsPath, 
HdfsConfiguration configurati
             }
 
             if (outputDest.exists()) {
-                outputDest.delete();
+                boolean result = outputDest.delete();
+                if (!result) {
+                    LOG.error("failed to delete {}" + outputDest);

Review comment:
       sorry, too hot for my brain. Will fix




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to