From fa79f2aa14845da97378c70a2d696dff19b47ef1 Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Fri, 17 Jan 2014 10:24:10 -0600 Subject: [PATCH] Issue #2359 fix annoying ncep null pointer Change-Id: I5d606f42bfe4060f8874d2cfaf01a48b548ce25e Former-commit-id: 0cb0975786aa578e93fe06227c666feb759e0433 --- .../nonconvsigmet/util/NonConvSigmetParser.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/src/gov/noaa/nws/ncep/edex/plugin/nonconvsigmet/util/NonConvSigmetParser.java b/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/src/gov/noaa/nws/ncep/edex/plugin/nonconvsigmet/util/NonConvSigmetParser.java index d0cf71c3ae..1c5ea21e4a 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/src/gov/noaa/nws/ncep/edex/plugin/nonconvsigmet/util/NonConvSigmetParser.java +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/src/gov/noaa/nws/ncep/edex/plugin/nonconvsigmet/util/NonConvSigmetParser.java @@ -11,6 +11,7 @@ * 07/2011 F. J. Yen Fix for RTN TTR 9973--ConvSigment Decoder Ignoring * time range (NonConvsigmet, too). Set the rangeEnd * time to the endTime + * Jan 17, 2014 njensen Handle if one or more locations not found in LatLonLocTbl * * This code has been developed by the SIB for use in the AWIPS2 system. */ @@ -344,14 +345,17 @@ public class NonConvSigmetParser { currentLocation.setLocationLine(lines); currentLocation.setLocation(location); point = LatLonLocTbl.getLatLonPoint(location, "vors"); - currentLocation.setIndex(idxLocation + 1); - idxLocation++; - currentLocation.setLatitude(point + if(point != null) { + currentLocation.setIndex(idxLocation + 1); + idxLocation++; + currentLocation.setLatitude(point .getLatitude(LatLonPoint.INDEGREES)); - currentLocation.setLongitude(point + currentLocation.setLongitude(point .getLongitude(LatLonPoint.INDEGREES)); - recordTable.addNonConvSigmetLocation(currentLocation); + recordTable.addNonConvSigmetLocation(currentLocation); + } } + hasLocationLine = (idxLocation > 0); } else { hasLocationLine = false; } @@ -406,4 +410,4 @@ public class NonConvSigmetParser { return currentRecord; } -} \ No newline at end of file +}