Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/LocationDistanceSelect.java @ 352:ed3325a0232a
Throw an illegal argument exception in LocationDistanceSelect.validate() and WQSelect.validate() if no data has been inserted so far.
flys-artifacts/trunk@1759 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 28 Apr 2011 11:08:34 +0000 |
parents | 448d0dc64357 |
children | c21fb8de54f8 |
comparison
equal
deleted
inserted
replaced
351:2d268f9894bb | 352:ed3325a0232a |
---|---|
162 | 162 |
163 String fromStr = (String) data.get(FROM).getValue(); | 163 String fromStr = (String) data.get(FROM).getValue(); |
164 String toStr = (String) data.get(TO).getValue(); | 164 String toStr = (String) data.get(TO).getValue(); |
165 String stepStr = (String) data.get(STEP).getValue(); | 165 String stepStr = (String) data.get(STEP).getValue(); |
166 | 166 |
167 if (fromStr == null || toStr == null || stepStr == null) { | |
168 throw new IllegalArgumentException("error_empty_state"); | |
169 } | |
170 | |
167 try { | 171 try { |
168 double from = Double.parseDouble(fromStr); | 172 double from = Double.parseDouble(fromStr); |
169 double to = Double.parseDouble(toStr); | 173 double to = Double.parseDouble(toStr); |
170 double step = Double.parseDouble(stepStr); | 174 double step = Double.parseDouble(stepStr); |
171 | 175 |