Skip to content

Commit 783ed9b

Browse files
committed
"Fixing" a Coverity/Findbugs finding.
1 parent ec56ee9 commit 783ed9b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.cloud.hypervisor.kvm.storage;
1818

1919
import java.io.File;
20+
import java.nio.charset.Charset;
2021
import java.util.ArrayList;
2122
import java.util.HashMap;
2223
import java.util.List;
@@ -384,7 +385,7 @@ public KVMStoragePool getStoragePool(String uuid, boolean refreshInfo) {
384385
String authUsername = spd.getAuthUserName();
385386
if (authUsername != null) {
386387
Secret secret = conn.secretLookupByUUIDString(spd.getSecretUUID());
387-
String secretValue = new String(Base64.encodeBase64(secret.getByteValue()));
388+
String secretValue = new String(Base64.encodeBase64(secret.getByteValue()), Charset.defaultCharset());
388389
pool.setAuthUsername(authUsername);
389390
pool.setAuthSecret(secretValue);
390391
}

0 commit comments

Comments
 (0)