cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [5/5] git commit: updated refs/heads/master to 509c83b
Date Mon, 15 Jun 2015 09:04:16 GMT
Fix findbugs encoding warning in JuniperSrxResource All .xml files contain only utf-8/us-ascii
compatible characters. If special characters are added to these files in the future, UTF-8
should be used for cross platform compatibility

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

This closes #398


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

Branch: refs/heads/master
Commit: 509c83bc746440e9ebc39c6547dd3d1793c21429
Parents: 438c90d
Author: Rafael da Fonseca <rsafonseca@gmail.com>
Authored: Sat Jun 13 00:53:30 2015 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Jun 15 12:03:56 2015 +0300

----------------------------------------------------------------------
 .../src/com/cloud/network/resource/JuniperSrxResource.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/509c83bc/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
b/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
index d89f1e9..d3a3f1b 100644
--- a/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
@@ -17,7 +17,7 @@
 package com.cloud.network.resource;
 
 import java.io.BufferedReader;
-import java.io.FileReader;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
@@ -191,7 +191,7 @@ public class JuniperSrxResource implements ServerResource {
                     throw new Exception("Failed to find Juniper SRX XML file: " + filename);
                 }
 
-                try(FileReader fr = new FileReader(xmlFilePath);
+                try(InputStreamReader fr = new InputStreamReader(new FileInputStream(xmlFilePath),"UTF-8");
                 BufferedReader br = new BufferedReader(fr);) {
                     String xml = "";
                     String line;


Mime
View raw message