Skip to content

Commit

Permalink
Merge pull request #1 from deki/master
Browse files Browse the repository at this point in the history
fixed NumberFormatException
  • Loading branch information
profesorfalken authored Jul 25, 2016
2 parents 4e10e38 + bb76067 commit 3c3a52d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private Sensors getSensors(String componentData) {
} else if (dataLine.startsWith("Fan")) {
String[] data = dataLine.split(":");
Fan fan = new Fan(data[0].trim(),
data[1].trim().length() > 0 ? Integer.valueOf(data[1].trim()) : 0);
data[1].trim().length() > 0 ? Double.valueOf(data[1].trim()) : 0.0);
fans.add(fan);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
*/
public class Fan {
public final String name;
public final Integer value;
public final Double value;

public Fan(String name, Integer value) {
public Fan(String name, Double value) {
this.name = name;
this.value = value;
}
Expand Down

0 comments on commit 3c3a52d

Please sign in to comment.