You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/06/15 11:04:15 UTC

[4/5] git commit: updated refs/heads/master to 509c83b

Fix findbugs encoding warning in HttpNfcLeaseMO VMWare ovf files are utf-8 encoded. Relying on default encoding in some platforms such as windows would cause erroneous characters from being read on some fields like description, and could also cause the import to fail, depending on the characters.

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>

This closes #397


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/438c90d7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/438c90d7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/438c90d7

Branch: refs/heads/master
Commit: 438c90d7838ff56d554fe0fccc7f019eff8d6741
Parents: cc6d28f
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sat Jun 13 00:37:36 2015 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Jun 15 12:00:02 2015 +0300

----------------------------------------------------------------------
 vmware-base/src/com/cloud/hypervisor/vmware/mo/HttpNfcLeaseMO.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/438c90d7/vmware-base/src/com/cloud/hypervisor/vmware/mo/HttpNfcLeaseMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HttpNfcLeaseMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HttpNfcLeaseMO.java
index a46edc0..6e4980c 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HttpNfcLeaseMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HttpNfcLeaseMO.java
@@ -121,7 +121,7 @@ public class HttpNfcLeaseMO extends BaseMO {
 
     public static String readOvfContent(String ovfFilePath) throws IOException {
         StringBuffer strContent = new StringBuffer();
-        BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(ovfFilePath)));
+        BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(ovfFilePath),"UTF-8"));
         String lineStr;
         while ((lineStr = in.readLine()) != null) {
             strContent.append(lineStr);