Commit 292d366d authored by yannick legoc's avatar yannick legoc
Browse files

Merge remote-tracking branch 'origin/V3'

parents d2867a55 ac68e8bf
3.0.4-SNAPSHOT
3.0.5-SNAPSHOT
--------------
* Catch exception thrown when trying to format a invalid float value (avoid a client crash : see brisp 03 nov 2016).
3.0.4
-----
* New method "getChildrenOfAllDynamicProperties" in PropertyManager
3.0.3
-----
......
......@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.ill.ics</groupId>
<artifactId>nomadcommandsystem</artifactId>
<version>3.0.4-SNAPSHOT</version>
<version>3.0.5-SNAPSHOT</version>
<name>NomadCommandSystem</name>
<description>Java bridge for the communication with the Nomad server</description>
<scm>
......
......@@ -29,10 +29,16 @@ public class Float64Property extends FloatProperty {
}
public String getServerValue() {
if (isCommandBox) {
return this.propertyFormat.formatForDisplay(new Double(AtomicCommandBoxAccessorProxy.getInstance(serverId).getFloat64Value(containerId, id)).toString());
} else {
return this.propertyFormat.formatForDisplay(new Double(DataAccessor.getInstance(serverId).getFloat64Value(containerId, id)).toString());
try {
if (isCommandBox) {
return this.propertyFormat.formatForDisplay(new Double(AtomicCommandBoxAccessorProxy.getInstance(serverId).getFloat64Value(containerId, id)).toString());
} else {
return this.propertyFormat.formatForDisplay(new Double(DataAccessor.getInstance(serverId).getFloat64Value(containerId, id)).toString());
}
} catch (Exception e) {
System.err.println("Exception while getting value for property " + getName());
ConfigManager.CONFIGURATION_ERROR = true;
return "";
}
}
......
......@@ -50,7 +50,12 @@ public class DecimalFormat extends PropertyFormat {
"0.000000",
"0.0000000",
"0.00000000",
"0.000000000"};
"0.000000000",
"0.0000000000",
"0.00000000000",
"0.000000000000",
"0.0000000000000"
};
public DecimalFormat(int numberOfDecimalPlaces, boolean isScientific) {
......@@ -120,8 +125,6 @@ public class DecimalFormat extends PropertyFormat {
} else {
df = new java.text.DecimalFormat(decimalDisplayFormats[nbOfDecimalPlaces]);
}
return df.format(valueAsDouble);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment