[PATCH] Fixed: gwt code did not compile due to ternary operator

Wald Commits scm-commit at wald.intevation.org
Fri Jul 27 16:19:13 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1532701149 -7200
# Node ID 6a77589237627e6b0e1fdfb07e4ac585f3dc5b4e
# Parent  b3d3c958a5948d0a0027192ba9ee933755c10edb
Fixed: gwt code did not compile due to ternary operator

diff -r b3d3c958a594 -r 6a7758923762 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/VegetationzonesTableEditPanel.java
--- 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);


More information about the Dive4Elements-commits mailing list