[ 
https://issues.apache.org/jira/browse/CAMEL-12731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16580772#comment-16580772
 ] 

ASF GitHub Bot commented on CAMEL-12731:
----------------------------------------

davsclaus closed pull request #2473: CAMEL-12731: Fix FindBugs warnings: Array 
formatted in useless way us…
URL: https://github.com/apache/camel/pull/2473
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/FutureEventDrivenOperation.java
 
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/FutureEventDrivenOperation.java
index 0fbcfeec1a3..34fb5b881ff 100644
--- 
a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/FutureEventDrivenOperation.java
+++ 
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/operations/FutureEventDrivenOperation.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.zookeeper.operations;
 
+import java.util.Arrays;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
@@ -69,7 +70,7 @@ public void process(WatchedEvent event) {
             if (b.length() > 0) {
                 b.setLength(b.length() - 2);
             }
-            LOG.trace(String.format("Recieved event of type %s did not match 
any watched types %s", received, awaitedTypes));
+            LOG.trace(String.format("Recieved event of type %s did not match 
any watched types %s", received, Arrays.toString(awaitedTypes)));
         }
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> FindBugs warnings: Array formatted in useless way using format string
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-12731
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12731
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-zookeeper
>            Reporter: Hiroaki Yoshida
>            Priority: Major
>
> FindBugs-3.0.1 ([http://findbugs.sourceforge.net/]) reported a 
> VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY warning on master:
> {code:java}
> H C USELESS_STRING: Argument of type 
> org.apache.zookeeper.Watcher$Event$EventType[] formatted in useless way in 
> org.apache.camel.component.zookeeper.operations.FutureEventDrivenOperation.process(WatchedEvent)
>   At FutureEventDrivenOperation.java:[line 72]
> {code}
> The description of the bug is as follows:
> {quote}*USELESS_STRING: Array formatted in useless way using format string 
> (VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY)*
> One of the arguments being formatted with a format string is an array. This 
> will be formatted using a fairly useless format, such as [I@304282, which 
> doesn't actually show the contents of the array. Consider wrapping the array 
> using Arrays.asList(...)before handling it off to a formatted.
>  
> [http://findbugs.sourceforge.net/bugDescriptions.html#VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY]
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to