[Dive4elements-commits] [PATCH 2 of 3] Accept null mode in to/fromValue
Wald Commits
scm-commit at wald.intevation.org
Tue Jun 4 16:05:04 CEST 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1370354537 -7200
# Node ID 95257f28bb3f7c1e9ffc9023937dd78da950d180
# Parent 65f278bd4ef5fba7f4efffa2a502ae351837c2c6
Accept null mode in to/fromValue
diff -r 65f278bd4ef5 -r 95257f28bb3f artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Tue Jun 04 16:01:43 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Tue Jun 04 16:02:17 2013 +0200
@@ -234,11 +234,7 @@
Object locations = args.get(1);
Object from = args.get(2);
- if (!(mode instanceof String)){
- return -FAR_AWAY;
- }
-
- if (mode.equals("locations")) {
+ if (mode instanceof String && mode.equals("locations")) {
if (!(locations instanceof String)) {
return -FAR_AWAY;
}
@@ -283,11 +279,7 @@
Object locations = args.get(1);
Object to = args.get(2);
- if (!(mode instanceof String)){
- return FAR_AWAY;
- }
-
- if (mode.equals("locations")) {
+ if (mode instanceof String && mode.equals("locations")) {
if (!(locations instanceof String)) {
return FAR_AWAY;
}
More information about the Dive4elements-commits
mailing list