Fix for values stored as integers

This commit is contained in:
Patrick McDonagh
2017-03-08 16:50:58 -06:00
parent 1f68cbee7e
commit a65cf33e9b
2 changed files with 15 additions and 19 deletions

View File

@@ -323,7 +323,7 @@ public class Database {
String storedBy = setpointDoc.getString("storedBy");
System.out.println("Setpoint retrieved from database: [" + setpointName + " = " + setpoint + " stored by " + storedBy + "]");
} catch (ClassCastException e){
setpoint = Double.parseDouble(setpointDoc.getString("value"));
setpoint = Double.parseDouble(setpointDoc.get("value").toString());
String storedBy = setpointDoc.getString("storedBy");
System.out.println("Setpoint retrieved from database: [" + setpointName + " = " + setpoint + " stored by " + storedBy + "]");
} catch (NullPointerException e){