Issue #2457 Improve error messages for missing radar icao.

Former-commit-id: 52beccc5c9 [formerly 52beccc5c9 [formerly ef0680d3f4acfa64d90af2e074f6642d1386d3ab]]
Former-commit-id: 7c8a3b80fa
Former-commit-id: 070e2cfdac
This commit is contained in:
Ben Steffensmeier 2013-10-09 12:11:04 -05:00
parent 75f9f891a7
commit 2edbb6e665
2 changed files with 25 additions and 19 deletions

View file

@ -85,17 +85,18 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 14, 2007 139 Phillippe Initial check-in. Refactor of initial
* implementation.
* Dec 17, 2007 600 bphillip Added dao pool usage
* Dec 03, 2010 2235 cjeanbap EDEXUtility.sendMessageAlertViz()
* signature changed.
* Mar 19, 2013 1804 bsteffen Optimize decoder performance.
* Mar 19, 2013 1785 bgonzale Added performance status handler and
* added status to decode.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Feb 14, 2007 139 Phillippe Initial check-in. Refactor of initial
* implementation.
* Dec 17, 2007 600 bphillip Added dao pool usage
* Dec 03, 2010 2235 cjeanbap EDEXUtility.sendMessageAlertViz()
* signature changed.
* Mar 19, 2013 1804 bsteffen Optimize decoder performance.
* Mar 19, 2013 1785 bgonzale Added performance status handler and
* added status to decode.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Oct 09, 2013 2457 bsteffen Improve error message for missing icao.
* </pre>
*
* @author bphillip
@ -222,8 +223,8 @@ public class RadarDecoder extends AbstractDecoder {
if (station == null) {
record.setIcao("unkn");
logger.error(headers.get("ingestfilename")
+ "-Unknown radar station id: "
+ l3Radar.getSourceId());
+ " contains an rpg id(" + l3Radar.getSourceId()
+ ") that is not in the radar_spatial table.");
} else {
record.setIcao(station.getRdaId().toLowerCase());
}

View file

@ -37,10 +37,12 @@ import com.vividsolutions.jts.geom.Coordinate;
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 19, 2010 #4473 rjpeter Initial creation.
* Mar 19, 2013 1804 bsteffen Cache db queries in radar decoder.
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Mar 19, 2010 #4473 rjpeter Initial creation.
* Mar 19, 2013 1804 bsteffen Cache db queries in radar decoder.
* Oct 09, 2013 2457 bsteffen Eliminate NullPointerException for rpg
* ids that are not in the database.
*
* </pre>
*
@ -110,8 +112,11 @@ public class RadarSpatialUtil {
RadarStation station = rpgIdDec2radarStation.get(rpgIdDec);
if (station == null) {
RadarStationDao stat = new RadarStationDao();
station = stat.queryByRpgIdDec(String.format("%03d", rpgIdDec));
rpgIdDec2radarStation.put(rpgIdDec, station);
String rpgId = String.format("%03d", rpgIdDec);
station = stat.queryByRpgIdDec(rpgId);
if (station != null) {
rpgIdDec2radarStation.put(rpgIdDec, station);
}
}
return station;
}