mirror of https://github.com/apache/cloudstack.git
findbugs replaced byte[].toString() with new String(byte[])
This commit is contained in:
parent
8e96111c55
commit
2513d6b91e
|
|
@ -125,7 +125,7 @@ public class LdapCreateAccountCmd extends BaseCmd {
|
|||
final SecureRandom randomGen = SecureRandom.getInstance("SHA1PRNG");
|
||||
final byte bytes[] = new byte[20];
|
||||
randomGen.nextBytes(bytes);
|
||||
return Base64.encode(bytes).toString();
|
||||
return new String(Base64.encode(bytes));
|
||||
} catch (final NoSuchAlgorithmException e) {
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR,
|
||||
"Failed to generate random password");
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ public class LdapImportUsersCmd extends BaseListCmd {
|
|||
final SecureRandom randomGen = SecureRandom.getInstance("SHA1PRNG");
|
||||
final byte bytes[] = new byte[20];
|
||||
randomGen.nextBytes(bytes);
|
||||
return Base64.encode(bytes).toString();
|
||||
return new String(Base64.encode(bytes));
|
||||
} catch (final NoSuchAlgorithmException e) {
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to generate random password");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue