"Fixing" a Coverity/Findbugs finding.

This commit is contained in:
Hugo Trippaers 2014-09-30 14:42:08 +02:00
parent ec56ee9eb8
commit 783ed9be98
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@
package com.cloud.hypervisor.kvm.storage;
import java.io.File;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -384,7 +385,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
String authUsername = spd.getAuthUserName();
if (authUsername != null) {
Secret secret = conn.secretLookupByUUIDString(spd.getSecretUUID());
String secretValue = new String(Base64.encodeBase64(secret.getByteValue()));
String secretValue = new String(Base64.encodeBase64(secret.getByteValue()), Charset.defaultCharset());
pool.setAuthUsername(authUsername);
pool.setAuthSecret(secretValue);
}