Omaha #5208 Fix NPE when pointset creates a level for styling.
Former-commit-id: 61c37c2f1882d3a0a0b0ddcfa466406811a268a1
This commit is contained in:
parent
e53d6e41c8
commit
a19dad515a
1 changed files with 4 additions and 2 deletions
|
@ -203,7 +203,8 @@ public class PointSetResource extends
|
||||||
* com.raytheon.uf.common.style.level.Level exposes units
|
* com.raytheon.uf.common.style.level.Level exposes units
|
||||||
*/
|
*/
|
||||||
Unit<?> unitsOut = result.getUpperMeasure().getUnit();
|
Unit<?> unitsOut = result.getUpperMeasure().getUnit();
|
||||||
if (!unitsIn.equals(unitsOut) && unitsIn.isCompatible(unitsOut)) {
|
if (unitsIn != null && !unitsIn.equals(unitsOut)
|
||||||
|
&& unitsIn.isCompatible(unitsOut)) {
|
||||||
UnitConverter converter = unitsIn.getConverterTo(unitsOut);
|
UnitConverter converter = unitsIn.getConverterTo(unitsOut);
|
||||||
double lowerValue = level.getLevelonevalue();
|
double lowerValue = level.getLevelonevalue();
|
||||||
double upperValue = level.getLeveltwovalue();
|
double upperValue = level.getLeveltwovalue();
|
||||||
|
@ -221,7 +222,8 @@ public class PointSetResource extends
|
||||||
* com.raytheon.uf.common.style.level.Level exposes units
|
* com.raytheon.uf.common.style.level.Level exposes units
|
||||||
*/
|
*/
|
||||||
Unit<?> unitsOut = result.getMeasure().getUnit();
|
Unit<?> unitsOut = result.getMeasure().getUnit();
|
||||||
if (!unitsIn.equals(unitsOut) && unitsIn.isCompatible(unitsOut)) {
|
if (unitsIn != null && !unitsIn.equals(unitsOut)
|
||||||
|
&& unitsIn.isCompatible(unitsOut)) {
|
||||||
double value = level.getLevelonevalue();
|
double value = level.getLevelonevalue();
|
||||||
value = unitsIn.getConverterTo(unitsOut).convert(value);
|
value = unitsIn.getConverterTo(unitsOut).convert(value);
|
||||||
result.setValue(value);
|
result.setValue(value);
|
||||||
|
|
Loading…
Add table
Reference in a new issue