mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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 <rohit.yadav@shapeblue.com> This closes #397
This commit is contained in:
parent
cc6d28fc98
commit
438c90d783
@ -121,7 +121,7 @@ public class HttpNfcLeaseMO extends BaseMO {
|
|||||||
|
|
||||||
public static String readOvfContent(String ovfFilePath) throws IOException {
|
public static String readOvfContent(String ovfFilePath) throws IOException {
|
||||||
StringBuffer strContent = new StringBuffer();
|
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;
|
String lineStr;
|
||||||
while ((lineStr = in.readLine()) != null) {
|
while ((lineStr = in.readLine()) != null) {
|
||||||
strContent.append(lineStr);
|
strContent.append(lineStr);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user