Issue #2652. Fixed issue with edex-text-ingest log.

Former-commit-id: bfa84e65ec [formerly 728e5b2d7ecad662e0c876533726d4bdd5c265d7]
Former-commit-id: 5087a0154d
This commit is contained in:
Slav Korolev 2014-02-25 15:23:22 -05:00
parent 3f0e9d7a77
commit a34b1196b7

View file

@ -487,7 +487,8 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
// If the XXX is 3 characters, and the origin starts with K, try
// prepending K or P (the latter for AK, HI products)
if ((trimmedXXX.length() == 3) && (origin.startsWith("K"))) {
if ((trimmedXXX.length() == 3)
&& (origin.startsWith("K") && !trimmedXXX.equals("RMK"))) {
newId = "K" + trimmedXXX;
if ((CCC_id = staticData.mapICAOToCCC(newId)) == null) {
newId = "P" + trimmedXXX;
@ -499,10 +500,10 @@ public class StdCollectiveSeparator extends WMOMessageSeparator {
}
}
// Otherwise, if the XXX is 3 characters, try prepending the first
// character of the origin.
else if (trimmedXXX.length() == 3) {
// character of the origin except "RMK" which is remark code.
else if (trimmedXXX.length() == 3 && !trimmedXXX.equals("RMK")) {
newId = origin.charAt(0) + trimmedXXX;
if ((CCC_id = staticData.mapICAOToCCC(XXX_id.toString())) == null) {
if ((CCC_id = staticData.mapICAOToCCC(newId)) == null) {
// logger.error("NCF_FAIL to map XXX to CCC: " + XXX_id);
return false;
}