Skip to content

Commit

Permalink
Fixed integer to string conversions for the networking.
Browse files Browse the repository at this point in the history
  • Loading branch information
pid1 committed Apr 28, 2015
1 parent b3399dc commit 3252ce4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/server/server.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public void run() {
// Outputs the current temperature to the console and writes to disk
System.out.printf("The current temperature is: %d \n", currentTemperature);
String currentTempString = Integer.toString(currentTemperature);
//this.setCurrentTempForSerialNumber();
} finally {
socket.close();
}
Expand Down
2 changes: 1 addition & 1 deletion src/thermostat/ThermostatDevice.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void sendCurrentTemp(String currentTemp, String serverIP) throws IOExcept
// Instantiate a printwriter so we can write to the output stream
PrintWriter out = new PrintWriter(sender.getOutputStream(), true);
// Send out the value of currentTemperature
int currentTempInt = Integer.parseInt(currentTemp);
int currentTempInt = Integer.valueOf(currentTemp).intValue();
out.println(currentTempInt);
}
} finally {
Expand Down

0 comments on commit 3252ce4

Please sign in to comment.