Issue #2721 Fix error when activeSites.txt contains blank lines.
Change-Id: I76b9b21134907f5297bae5fb106334ed54f5b6ac Former-commit-id:3cf3a9e70c
[formerly3af33de29b
] [formerlyaa62ab0fd8
[formerly d711aa3552e660aba1ac885c0767bab8c856da54]] Former-commit-id:aa62ab0fd8
Former-commit-id:7621944608
This commit is contained in:
parent
f2f1f95863
commit
507d8a63f8
1 changed files with 17 additions and 13 deletions
|
@ -63,6 +63,7 @@ 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>
|
||||
*
|
||||
|
@ -297,9 +298,12 @@ public class SiteAwareRegistry {
|
|||
in = new BufferedReader(new FileReader(file));
|
||||
String site;
|
||||
while ((site = in.readLine()) != null) {
|
||||
site = site.trim();
|
||||
if (!site.isEmpty()) {
|
||||
activeSites.add(site);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error loading active sites", e);
|
||||
|
|
Loading…
Add table
Reference in a new issue