cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [01/13] git commit: updated refs/heads/master to 967da97
Date Mon, 15 Jun 2015 09:06:51 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 509c83bc7 -> 967da97f5


Fix findbugs warning in LibvirtConsoleProxyLoadCommandWrapper Encoding is now specified in
both server and clients for the console proxy getstatus command For some reason, findbugs
did not detect unsafe encoding issue in ConsoleProxyResource.java, is properly specified now
though... CitrixConsoleProxyLoadCommandWrapper was specifying system default encoding for
operation, should be ok because default for xenserver is UTF-8 since it's linux based, but
it's best to specify exact encoding set on the server end to be consistent

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


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

Branch: refs/heads/master
Commit: 949e97dec65615e8c79d51b23b9be4b69c4e889c
Parents: 509c83b
Author: Rafael da Fonseca <rsafonseca@gmail.com>
Authored: Sat Jun 13 01:46:26 2015 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Jun 15 12:04:18 2015 +0300

----------------------------------------------------------------------
 .../cloud/agent/resource/consoleproxy/ConsoleProxyResource.java  | 2 +-
 .../resource/wrapper/LibvirtConsoleProxyLoadCommandWrapper.java  | 4 ++--
 .../wrapper/xenbase/CitrixConsoleProxyLoadCommandWrapper.java    | 4 ++--
 .../src/com/cloud/consoleproxy/ConsoleProxyCmdHandler.java       | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/949e97de/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
----------------------------------------------------------------------
diff --git a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
index 16173aa..08f0982 100644
--- a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
+++ b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
@@ -149,7 +149,7 @@ public class ConsoleProxyResource extends ServerResourceBase implements
ServerRe
             final URLConnection conn = url.openConnection();
 
             final InputStream is = conn.getInputStream();
-            final BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+            final BufferedReader reader = new BufferedReader(new InputStreamReader(is,"UTF-8"));
             final StringBuilder sb2 = new StringBuilder();
             String line = null;
             try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/949e97de/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConsoleProxyLoadCommandWrapper.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConsoleProxyLoadCommandWrapper.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConsoleProxyLoadCommandWrapper.java
index 125a295..1a2f7cb 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConsoleProxyLoadCommandWrapper.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtConsoleProxyLoadCommandWrapper.java
@@ -50,7 +50,7 @@ public abstract class LibvirtConsoleProxyLoadCommandWrapper<T extends
Command, A
             final URLConnection conn = url.openConnection();
 
             final InputStream is = conn.getInputStream();
-            final BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+            final BufferedReader reader = new BufferedReader(new InputStreamReader(is,"UTF-8"));
             final StringBuilder sb2 = new StringBuilder();
             String line = null;
             try {
@@ -75,4 +75,4 @@ public abstract class LibvirtConsoleProxyLoadCommandWrapper<T extends
Command, A
 
         return new ConsoleProxyLoadAnswer(cmd, proxyVmId, proxyVmName, success, result);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/949e97de/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixConsoleProxyLoadCommandWrapper.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixConsoleProxyLoadCommandWrapper.java
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixConsoleProxyLoadCommandWrapper.java
index 4b863a2..30a6a1b 100644
--- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixConsoleProxyLoadCommandWrapper.java
+++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixConsoleProxyLoadCommandWrapper.java
@@ -55,7 +55,7 @@ public abstract class CitrixConsoleProxyLoadCommandWrapper<T extends
Command, A
             conn.setReadTimeout(5000);
 
             final InputStream is = conn.getInputStream();
-            final BufferedReader reader = new BufferedReader(new InputStreamReader(is, Charset.defaultCharset()));
+            final BufferedReader reader = new BufferedReader(new InputStreamReader(is,"UTF-8"));
             final StringBuilder sb2 = new StringBuilder();
             String line = null;
             try {
@@ -80,4 +80,4 @@ public abstract class CitrixConsoleProxyLoadCommandWrapper<T extends
Command, A
 
         return new ConsoleProxyLoadAnswer(cmd, proxyVmId, proxyVmName, success, result);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/949e97de/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyCmdHandler.java
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyCmdHandler.java
b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyCmdHandler.java
index 76d1369..71ce5a7 100644
--- a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyCmdHandler.java
+++ b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyCmdHandler.java
@@ -63,7 +63,7 @@ public class ConsoleProxyCmdHandler implements HttpHandler {
             Headers hds = t.getResponseHeaders();
             hds.set("Content-Type", "text/plain");
             t.sendResponseHeaders(200, 0);
-            OutputStreamWriter os = new OutputStreamWriter(t.getResponseBody());
+            OutputStreamWriter os = new OutputStreamWriter(t.getResponseBody(),"UTF-8");
             statsCollector.getStatsReport(os);
             os.close();
         }


Mime
View raw message