[
https://issues.apache.org/jira/browse/CAMEL-12726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16577247#comment-16577247
]
Alex Dettinger edited comment on CAMEL-12726 at 8/11/18 5:21 PM:
-----------------------------------------------------------------
Merged on master. Could arguably be a candidate to be back-ported in older
branches (mainly the mbean part). Please re-open if needed.
was (Author: aldettinger):
Merged on master. Could arguably be a candidate to backport in older branch
(mainly the mben part). Please re-open if needed.
> FindBugs warnings: Invocation of toString on an array
> -----------------------------------------------------
>
> Key: CAMEL-12726
> URL: https://issues.apache.org/jira/browse/CAMEL-12726
> Project: Camel
> Issue Type: Bug
> Components: camel-box, camel-core, camel-jsch
> Reporter: Hiroaki Yoshida
> Assignee: Alex Dettinger
> Priority: Major
> Fix For: 2.23.0
>
>
> FindBugs-3.0.1 ([http://findbugs.sourceforge.net/]) reported 4
> DMI_INVOKING_TOSTRING_ON_ARRAY warnings on master:
> {code:java}
> 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]
> {code}
> The description of the bug is as follows:
> {quote}*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]
> {quote}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)