device template: fix add double value error
authorjihye424.kim <jihye424.kim@samsung.com>
Wed, 25 Nov 2015 07:40:20 +0000 (16:40 +0900)
committerjihye424.kim <jihye424.kim@samsung.com>
Wed, 25 Nov 2015 07:40:20 +0000 (16:40 +0900)
- 1.0 + 0.1 + 0.1 + 0.1 is not 1.3
-- 1.30000000000001 (???)
- there are some solution (using BigDecimal, using % ...)
- need version value to check whether template is updated or not
-- so, simply change to use one digit of double value

Change-Id: Ib7f7b8030f1ff2d0cf60b1352d5e8cd543e9c81d
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
src/org/tizen/emulator/manager/devices/DeviceTemplateValue.java

index 5b10d60..0d5540a 100644 (file)
@@ -184,7 +184,8 @@ public class DeviceTemplateValue implements Cloneable {
        }
 
        public void updateVersion() {
-               this.version += 0.1;
+               double ver = version + 0.1;
+               version = Double.parseDouble(String.format("%.1f", ver));
        }
 
        public String getManufacturer() {