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:08:06 UTC
[3/3] git commit: updated refs/heads/master to ccd7d41
Resolve findbugs encoding warning
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
This closes #392
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ccd7d41e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ccd7d41e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ccd7d41e
Branch: refs/heads/master
Commit: ccd7d41ee3bb7ab21dd51517a982993ec245ff72
Parents: 980d858
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 12 20:58:41 2015 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Jun 15 12:07:55 2015 +0300
----------------------------------------------------------------------
.../kvm/src/org/apache/cloudstack/utils/linux/CPUStat.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ccd7d41e/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/linux/CPUStat.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/linux/CPUStat.java b/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/linux/CPUStat.java
index d8228a4..ce33850 100644
--- a/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/linux/CPUStat.java
+++ b/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/linux/CPUStat.java
@@ -53,7 +53,7 @@ public class CPUStat {
private UptimeStats getUptimeAndCpuIdleTime() {
UptimeStats uptime = new UptimeStats(0d, 0d);
File f = new File(_uptimeFile);
- try (Scanner scanner = new Scanner(f);) {
+ try (Scanner scanner = new Scanner(f,"UTF-8");) {
String[] stats = scanner.useDelimiter("\\Z").next().split("\\s+");
uptime = new UptimeStats(Double.parseDouble(stats[0]), Double.parseDouble(stats[1]));
} catch (FileNotFoundException ex) {