diff --git a/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteAwareRegistry.java b/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteAwareRegistry.java index 20bceafac7..4dc706b173 100644 --- a/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteAwareRegistry.java +++ b/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteAwareRegistry.java @@ -48,13 +48,13 @@ import com.raytheon.uf.edex.core.props.PropertiesFactory; import com.raytheon.uf.edex.site.SiteActivationMessage.Action; /** - * + * * Site Aware Registry - * + * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Nov 30, 2010            rjpeter     Initial creation
@@ -63,9 +63,10 @@ import com.raytheon.uf.edex.site.SiteActivationMessage.Action;
  * Nov 1, 2012   15417     ryu         Modified getActiveSites to include
  *                                     home site only if activated.
  * Dec 11, 2012  14360     ryu         No printing stack trace on activation exception
- *
+ * Mar 10, 2014  2721      randerso    Fix error when activeSites.txt contains blank lines.
+ * 
  * 
- * + * * @author rjpeter * @version 1.0 */ @@ -101,7 +102,7 @@ public class SiteAwareRegistry { /** * registers/adds site activation listeners - * + * * @param sa * the listener to register / add to the list */ @@ -135,7 +136,7 @@ public class SiteAwareRegistry { /** * get the set of strings for the active sites - * + * * @return the requested array of Strings this is a string array to make it * work with dwr frontend, most of the other stuff is Set */ @@ -157,7 +158,7 @@ public class SiteAwareRegistry { /** * Checks to see if the given site is active - * + * * @param site * The site to check * @return True if the site is active, else false @@ -183,7 +184,7 @@ public class SiteAwareRegistry { /** * activate the site specified in each listener - * + * * @param siteID */ public void activateSite(String siteID) { @@ -204,7 +205,7 @@ public class SiteAwareRegistry { /** * deactivate the site specified in each listener - * + * * @param siteID */ public void deactivateSite(String siteID) { @@ -224,7 +225,7 @@ public class SiteAwareRegistry { /** * cycle the site specified in each listener - * + * * @param siteID */ public void cycleSite(String siteID) { @@ -297,7 +298,10 @@ public class SiteAwareRegistry { in = new BufferedReader(new FileReader(file)); String site; while ((site = in.readLine()) != null) { - activeSites.add(site); + site = site.trim(); + if (!site.isEmpty()) { + activeSites.add(site); + } } } } catch (IOException e) {