[
https://issues.apache.org/jira/browse/CLOUDSTACK-8551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14581709#comment-14581709
]
ASF GitHub Bot commented on CLOUDSTACK-8551:
--------------------------------------------
GitHub user karuturi opened a pull request:
https://github.com/apache/cloudstack/pull/388
Fixed CLOUDSTACK-8551 Findbugs warning in LdapCreateAccountCmd.java
byte[].toString() would give reference to the array (ex: [B@6c521576 )
but not the original string. used new String() to get the text.
added a unittest to validate
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/karuturi/cloudstack CLOUDSTACK-8551
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/388.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #388
----
commit d46b658ec0a997d8e55cfc818dca2ad869447d46
Author: Rajani Karuturi <[email protected]>
Date: 2015-06-11T08:35:03Z
Fixed CLOUDSTACK-8551 Findbugs warning in LdapCreateAccountCmd.java
byte[].toString() would give reference to the array (ex: [B@6c521576 )
but not the original string. used new String() to get the text.
----
> Findbugs warning in LdapCreateAccountCmd.java
> ---------------------------------------------
>
> Key: CLOUDSTACK-8551
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8551
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Affects Versions: 4.3.0, 4.4.0, 4.5.1
> Reporter: Rajani Karuturi
> Assignee: Rajani Karuturi
> Labels: ldap
> Fix For: 4.6.0
>
>
> LdapCreateAccountCmd.java:146, DMI_INVOKING_TOSTRING_ON_ARRAY, Priority: High
> Invocation of toString on
> org.bouncycastle.util.encoders.Base64.encode(byte[]) in
> org.apache.cloudstack.api.command.LdapCreateAccountCmd.generatePassword()
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)