Skip to content

Commit 548efca

Browse files
author
Boris Schrijver
committed
Fixed Findbugs issue introduced by 1c6378e PR #795.
1 parent 1971614 commit 548efca

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

services/secondary-storage/server/src/org/apache/cloudstack/storage/template/DownloadManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.math.BigInteger;
2525
import java.net.URI;
2626
import java.net.URISyntaxException;
27+
import java.nio.charset.Charset;
2728
import java.security.MessageDigest;
2829
import java.security.NoSuchAlgorithmException;
2930
import java.text.SimpleDateFormat;
@@ -423,7 +424,7 @@ private String postLocalDownload(String jobId) {
423424
if (extension.equals("iso")) {
424425
templateName = jobs.get(jobId).getTmpltName().trim().replace(" ", "_");
425426
} else {
426-
templateName = java.util.UUID.nameUUIDFromBytes((jobs.get(jobId).getTmpltName() + System.currentTimeMillis()).getBytes()).toString();
427+
templateName = java.util.UUID.nameUUIDFromBytes((jobs.get(jobId).getTmpltName() + System.currentTimeMillis()).getBytes(Charset.forName("UTF-8"))).toString();
427428
}
428429

429430
// run script to mv the temporary template file to the final template

0 commit comments

Comments
 (0)