From 81c0a30e06e0b3f6a7c7d37701b3a96f72c8dc9e Mon Sep 17 00:00:00 2001 From: Ron Anderson Date: Wed, 6 Aug 2014 09:59:14 -0500 Subject: [PATCH] Omaha #3157 Fix merge issue in ActiveTable.py Change-Id: I39550855a413791beb2e02c536f9bdfdf80ff514 Former-commit-id: 0f20f6d2513350b24454d4a29b65be6118e61e91 [formerly 49988ea258e46d6d2242e1a016a44c996ca2e168 [formerly 6393d231e108ef26a30b1a90c41e3ffb74ba6b51] [formerly 0f20f6d2513350b24454d4a29b65be6118e61e91 [formerly 295f52411e700afddc04390b7016e627d7c676bd]]] Former-commit-id: 49988ea258e46d6d2242e1a016a44c996ca2e168 [formerly 6393d231e108ef26a30b1a90c41e3ffb74ba6b51] Former-commit-id: 49988ea258e46d6d2242e1a016a44c996ca2e168 Former-commit-id: 9feb625df5fc7e1294b23d86e139698abe3c13c9 --- .../uf/edex/activetable/ActiveTable.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.edex.activetable/src/com/raytheon/uf/edex/activetable/ActiveTable.java b/edexOsgi/com.raytheon.uf.edex.activetable/src/com/raytheon/uf/edex/activetable/ActiveTable.java index 3191547456..28597ce764 100644 --- a/edexOsgi/com.raytheon.uf.edex.activetable/src/com/raytheon/uf/edex/activetable/ActiveTable.java +++ b/edexOsgi/com.raytheon.uf.edex.activetable/src/com/raytheon/uf/edex/activetable/ActiveTable.java @@ -22,6 +22,7 @@ package com.raytheon.uf.edex.activetable; import java.io.File; import java.util.Arrays; import java.util.Calendar; +import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.HashSet; @@ -55,9 +56,9 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.PerformanceStatus; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; -import com.raytheon.uf.common.util.CollectionUtil; import com.raytheon.uf.common.time.util.ITimer; import com.raytheon.uf.common.time.util.TimeUtil; +import com.raytheon.uf.common.util.CollectionUtil; import com.raytheon.uf.common.util.FileUtil; import com.raytheon.uf.edex.core.EDEXUtil; import com.raytheon.uf.edex.database.DataAccessLayerException; @@ -222,9 +223,9 @@ public class ActiveTable { ActiveTableMode mode, String phensigList, String act, String etn, String[] wfos) { - if (wfos == null || !Arrays.asList(wfos).contains("all")) { + if ((wfos == null) || !Arrays.asList(wfos).contains("all")) { - if (wfos == null || wfos.length == 0) { + if ((wfos == null) || (wfos.length == 0)) { // default to WFOs from VTECPartners Set wfoSet = getDecoderSites(siteId); @@ -263,10 +264,10 @@ public class ActiveTable { List wfoList = (List) vtecPartners .getattr("VTEC_DECODER_SITES"); wfoSet.addAll(wfoList); - String spcSite = (String) vtecPartners.getattr("VTEC_SPC_SITE"); - wfoSet.add(spcSite); - String tpcSite = (String) vtecPartners.getattr("VTEC_TPC_SITE"); - wfoSet.add(tpcSite); + Collection spcSite = vtecPartners.getSpcSites(); + wfoSet.addAll(spcSite); + Collection tpcSite = vtecPartners.getTpcSites(); + wfoSet.addAll(tpcSite); } return wfoSet; } @@ -354,14 +355,14 @@ public class ActiveTable { PythonScript python = threadLocalPythonScript.get(); try { result = (MergeResult) python.execute("mergeFromJava", args); - } catch (JepException e) { - statusHandler.handle(Priority.PROBLEM, - "Error updating active table", e); - } - } catch (Exception e) { + } catch (JepException e) { statusHandler.handle(Priority.PROBLEM, - "Error initializing active table python", e); + "Error updating active table", e); } + } catch (Exception e) { + statusHandler.handle(Priority.PROBLEM, + "Error initializing active table python", e); + } return result; } @@ -421,11 +422,11 @@ public class ActiveTable { query.addQueryParam("etn", etn, "in"); } - if (requestValidTimes && currentTime != null) { + if (requestValidTimes && (currentTime != null)) { // Current Time query.addQueryParam("endTime", currentTime, "greater_than"); } - if (latestEtn && currentTime != null) { + if (latestEtn && (currentTime != null)) { Calendar yearStart = Calendar.getInstance(); yearStart.set(currentTime.get(Calendar.YEAR), Calendar.JANUARY, 0, 0, 0);