findbugs replaced byte[].toString() with new String(byte[])

This commit is contained in:
Daan Hoogland 2014-02-02 19:50:58 +01:00
parent 8e96111c55
commit 2513d6b91e
2 changed files with 2 additions and 2 deletions

View File

@ -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");

View File

@ -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");
}