Merge "Issue #2721 Fix error when activeSites.txt contains blank lines." into development
Former-commit-id:116826d0f8
[formerlybd57a18a29
] [formerly6b51b05bdf
] [formerly116826d0f8
[formerlybd57a18a29
] [formerly6b51b05bdf
] [formerlyf3a6acaf48
[formerly6b51b05bdf
[formerly e665fa251dab6afb16d5a3863aac0815e84a00d4]]]] Former-commit-id:f3a6acaf48
Former-commit-id:c8ecb9a934
[formerlyd6d544bc3b
] [formerly fb4aba70507fc50b99a5a3d974471405f7dc99ef [formerly7b272e271c
]] Former-commit-id: bd60ee87653f0192f19731592bfd66a8b44e519b [formerly9d60bad8f7
] Former-commit-id:178a11fc31
This commit is contained in:
commit
bc8476d4cb
1 changed files with 17 additions and 13 deletions
|
@ -48,13 +48,13 @@ import com.raytheon.uf.edex.core.props.PropertiesFactory;
|
|||
import com.raytheon.uf.edex.site.SiteActivationMessage.Action;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Site Aware Registry
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @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<String>
|
||||
*/
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue