From bfbc852e46f3d1f0818071d7febc3d266177b5e4 Mon Sep 17 00:00:00 2001 From: Rafael da Fonseca Date: Sun, 14 Jun 2015 14:11:56 +0200 Subject: [PATCH] Fix 2 findbugs warnings in VmwareStorageManagerImpl.java Template files and metadata should be written to file in UTF-8 --- .../hypervisor/vmware/manager/VmwareStorageManagerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java index 34ede035af1f..4d2197a6cd28 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java @@ -786,7 +786,7 @@ private void postCreatePrivateTemplate(String installFullPath, long templateId, // TODO a bit ugly here BufferedWriter out = null; try { - out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(installFullPath + "/template.properties"))); + out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(installFullPath + "/template.properties"),"UTF-8")); out.write("filename=" + templateName + ".ova"); out.newLine(); out.write("description="); @@ -826,7 +826,7 @@ private void writeMetaOvaForTemplate(String installFullPath, String ovfFilename, // TODO a bit ugly here BufferedWriter out = null; try { - out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(installFullPath + "/" + templateName + ".ova.meta"))); + out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(installFullPath + "/" + templateName + ".ova.meta"),"UTF-8")); out.write("ova.filename=" + templateName + ".ova"); out.newLine(); out.write("version=1.0");