comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelGroundDifferences.java @ 7736:714fda61b006

Server side validation for flys/issue1549.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 23 Jan 2014 17:48:55 +0100
parents af13ceeba52a
children e4606eae8ea5
comparison
equal deleted inserted replaced
7735:46273d890da5 7736:714fda61b006
159 } 159 }
160 catch (NumberFormatException nfe) { 160 catch (NumberFormatException nfe) {
161 throw new IllegalArgumentException("error_invalid_double_value"); 161 throw new IllegalArgumentException("error_invalid_double_value");
162 } 162 }
163 } 163 }
164
165 @Override
166 protected boolean validateBounds(
167 double fromValid, double toValid,
168 double from, double to
169 ) throws IllegalArgumentException {
170 if (to < 0d) {
171 logger.error(
172 "Invalid 'to' " + to + " is lesser than zero.");
173 throw new IllegalArgumentException("error_feed_from_out_of_range");
174 }
175 return super.validateBounds(fromValid, toValid, from, to);
176 }
164 } 177 }
165 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 178 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org