ASM #15551 - WarnGen: only WCN should be used while including TOR/SVR watches in WarnGen products

Change-Id: I8b8e9ae40596e5a3d5f0aa44d2e946aa7a68a1ae

Former-commit-id: c8aa2fbfc35c872e2d50de2212eaf16db9b5483d
This commit is contained in:
David Friedman 2014-09-26 15:13:56 +00:00
parent c85b0d1cfd
commit db29ec9dec

View file

@ -498,11 +498,13 @@ public class WatchUtil {
// Filters out extra Watches that have different startTime but same phenSig, etn, state, partOfState, endTime, and marineArea.
Map<String, Watch> watchMap = new LinkedHashMap<String, Watch>();
for (Watch w: watches) {
List<String> pos = new ArrayList<String>(w.getPartOfState());
Collections.sort(pos);
List<String> pos = w.getPartOfState() != null ?
new ArrayList<String>(w.getPartOfState()) : null;
if (pos != null)
Collections.sort(pos);
String key = String.valueOf(w.getPhenSig())
+ String.valueOf(w.getEtn()) + String.valueOf(w.getState())
+ pos + String.valueOf(w.getEndTime());
+ String.valueOf(pos) + String.valueOf(w.getEndTime());
if (w.getMarineArea() != null) {
key = key + '.' + w.getMarineArea();
}