changeset 9329:6a7758923762

Fixed: gwt code did not compile due to ternary operator
author gernotbelger
date Fri, 27 Jul 2018 16:19:09 +0200
parents b3d3c958a594
children 0a0937f33bb5
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/VegetationzonesTableEditPanel.java
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/VegetationzonesTableEditPanel.java	Fri Jul 27 15:50:51 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/VegetationzonesTableEditPanel.java	Fri Jul 27 16:19:09 2018 +0200
@@ -70,7 +70,14 @@
                 final String v1 = VegetationzonesTableEditPanel.this.start.getValueAsString();
                 final String v2 = VegetationzonesTableEditPanel.this.end.getValueAsString();
                 final String v3 = VegetationzonesTableEditPanel.this.vegzone.getValueAsString();
-                final String v4 = VegetationZone.HAS_COLORS_EDITABLE ? colorPicker.getValueAsString() : "#ffffff";
+                
+                // REMARK: can't use 'ternary operator' here, becuae gwt (or java 6?) doesnt like it.
+                final String v4;
+                if (VegetationZone.HAS_COLORS_EDITABLE)
+                    v4 = colorPicker.getValueAsString();
+                else
+                    v4 = "#ffffff";
+                
                 final String message = validate(v1, v2, v3, v4);
                 if (message != null) {
                     SC.warn(message);

http://dive4elements.wald.intevation.org