Mercurial > dive4elements > river
changeset 5506:57f802db5c5a
Removed obsolete imports. Minor code simplifications.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 28 Mar 2013 15:55:34 +0100 |
parents | 1b036a409575 |
children | db6c7268b08e 627584bc0586 |
files | flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MeasurementStationInfoService.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/sq/SQStaticState.java |
diffstat | 2 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MeasurementStationInfoService.java Thu Mar 28 15:35:42 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MeasurementStationInfoService.java Thu Mar 28 15:55:34 2013 +0100 @@ -15,7 +15,6 @@ import de.intevation.artifacts.GlobalContext; import de.intevation.flys.model.MeasurementStation; -import de.intevation.flys.model.Gauge; import de.intevation.flys.model.Range; import de.intevation.flys.model.TimeInterval;
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/sq/SQStaticState.java Thu Mar 28 15:35:42 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/sq/SQStaticState.java Thu Mar 28 15:55:34 2013 +0100 @@ -1,11 +1,8 @@ package de.intevation.flys.artifacts.states.sq; import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Calendar; import java.util.List; -import javax.swing.text.DateFormatter; import org.apache.log4j.Logger; @@ -44,7 +41,7 @@ int ms = -1; try { - ms = Integer.valueOf(measurementStation); + ms = Integer.parseInt(measurementStation); } catch (NumberFormatException nfe) { log.error("Unparseable measurement station: " + measurementStation); @@ -54,13 +51,12 @@ StaticSQContainer sqRelations = StaticSQFactory.getSQRelations(river, ms); - for (int i = 0; i < StaticSQRelation.Parameter.values().length; i++) { - StaticSQRelation.Parameter p = - StaticSQRelation.Parameter.values()[i]; + for (StaticSQRelation.Parameter p: StaticSQRelation.Parameter.values()) { List<StaticSQRelation> relations = sqRelations.getRelationsByParameter(p); - if (relations.size() > 0) { + + if (!relations.isEmpty()) { int count = 0; for (StaticSQRelation relation : relations) {