Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/MiddleBedHeightCalculation.java @ 5920:22dbf92a4f18
Partial fix for issue862: avoid NPE.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 07 May 2013 15:47:07 +0200 |
parents | 4897a58c8746 |
children | af13ceeba52a |
comparison
equal
deleted
inserted
replaced
5919:c35323148b98 | 5920:22dbf92a4f18 |
---|---|
145 logger.debug("Prepare data for single: " + single.getDescription()); | 145 logger.debug("Prepare data for single: " + single.getDescription()); |
146 | 146 |
147 List<BedHeightSingleValue> values = | 147 List<BedHeightSingleValue> values = |
148 BedHeightSingleValue.getBedHeightSingleValues(single, kmLo, kmHi); | 148 BedHeightSingleValue.getBedHeightSingleValues(single, kmLo, kmHi); |
149 | 149 |
150 int year = single.getYear() != null ? single.getYear() : 0; | |
151 | |
150 MiddleBedHeightData data = new MiddleBedHeightData( | 152 MiddleBedHeightData data = new MiddleBedHeightData( |
151 single.getYear(), | 153 year, |
152 single.getYear(), | 154 year, |
153 single.getEvaluationBy(), | 155 single.getEvaluationBy(), |
154 single.getDescription()); | 156 single.getDescription()); |
155 | 157 |
156 for (BedHeightSingleValue value: values) { | 158 for (BedHeightSingleValue value: values) { |
157 if (value.getHeight() != null) { | 159 if (value.getHeight() != null) { |