Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Patch Available
-
Unknown
Description
FindBugs-3.0.1 (http://findbugs.sourceforge.net/) reported 4 DMI_INVOKING_TOSTRING_ON_ARRAY warnings on master:
H C USELESS_STRING: Invocation of toString on org.apache.camel.processor.RemoveHeadersProcessor.getExcludePattern() in new org.apache.camel.management.mbean.ManagedRemoveHeaders(CamelContext, RemoveHeadersProcessor, ProcessorDefinition) At ManagedRemoveHeaders.java:[line 37] H C USELESS_STRING: Invocation of toString on org.apache.camel.processor.RemovePropertiesProcessor.getExcludePattern() in new org.apache.camel.management.mbean.ManagedRemoveProperties(CamelContext, RemovePropertiesProcessor, ProcessorDefinition) At ManagedRemoveProperties.java:[line 37] M C USELESS_STRING: Invocation of toString on ScpConfiguration.getPrivateKeyBytes() in org.apache.camel.component.scp.ScpOperations.createSession(ScpConfiguration) At ScpOperations.java:[line 262] M C USELESS_STRING: Invocation of toString on path in org.apache.camel.component.box.api.BoxFoldersManager.createFolder(String, String[]) At BoxFoldersManager.java:[line 204]
The description of the bug is as follows:
USELESS_STRING: Invocation of toString on an array (DMI_INVOKING_TOSTRING_ON_ARRAY)
The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12.
http://findbugs.sourceforge.net/bugDescriptions.html#DMI_INVOKING_TOSTRING_ON_ARRAY