Issue #2581 fix yet another LSR decoding error

Change-Id: I74e6d8c3d5c6bf71ebbc3fe32ea93ea688c6bcb5

Former-commit-id: df3778f7c6 [formerly 79c9792148] [formerly 3ac67a743f] [formerly df3778f7c6 [formerly 79c9792148] [formerly 3ac67a743f] [formerly 968e51040d [formerly 3ac67a743f [formerly 3f2c97439a1dbbbc94285343b3b558dead63a0f6]]]]
Former-commit-id: 968e51040d
Former-commit-id: 945671fdc4 [formerly 59fc27dafb] [formerly 171f2bf5c41ccd55e091d92fc423bb389db59ba0 [formerly 79836008d7]]
Former-commit-id: 3ecc4b1d72122cacc54f96165238d4c07cad507d [formerly 1a5e8b9307]
Former-commit-id: 158cc6f460
This commit is contained in:
Nate Jensen 2014-01-08 08:56:02 -06:00
parent 78da87452a
commit aedd8494aa

View file

@ -54,6 +54,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 09, 2013 2581 njensen Reuse patterns for efficiency
* Check entire time line looking for latlon
* Jan 07, 2013 2581 njensen Check to end of string for source, not a set length
*
* </pre>
*
@ -92,8 +93,6 @@ public class LSRParser {
private static int SOURCE = 53; // source
private static int SOURCE_LENGTH = 16; // source max length
private static final Pattern LATLON_PTRN = Pattern
.compile("((([0-8][0-9]|90).\\d{2,2}[NS]) ++(1?+\\d{2,2}.\\d{2,2}[EW])())");
@ -419,11 +418,10 @@ public class LSRParser {
ss = dateLine.substring(STATE, STATE + STATE_LENGTH).trim();
rpt.setStateLoc(ss);
ss = dateLine.substring(SOURCE, SOURCE + SOURCE_LENGTH)
.trim();
ss = dateLine.substring(SOURCE).trim();
rpt.setSource(ss);
} catch (Exception e) {
logger.error("Bad date " + ss);
logger.error("Bad line " + dateLine);
}
}
}