|
@@ -63,7 +63,7 @@ public class HostsFileReader {
|
|
|
// Everything from now on is a comment
|
|
|
break;
|
|
|
}
|
|
|
- if (!nodes[i].equals("")) {
|
|
|
+ if (!nodes[i].isEmpty()) {
|
|
|
LOG.info("Adding " + nodes[i] + " to the list of hosts from " + filename);
|
|
|
set.add(nodes[i]); // might need to add canonical name
|
|
|
}
|
|
@@ -80,13 +80,13 @@ public class HostsFileReader {
|
|
|
|
|
|
public synchronized void refresh() throws IOException {
|
|
|
LOG.info("Refreshing hosts (include/exclude) list");
|
|
|
- if (!includesFile.equals("")) {
|
|
|
+ if (!includesFile.isEmpty()) {
|
|
|
Set<String> newIncludes = new HashSet<String>();
|
|
|
readFileToSet(includesFile, newIncludes);
|
|
|
// switch the new hosts that are to be included
|
|
|
includes = newIncludes;
|
|
|
}
|
|
|
- if (!excludesFile.equals("")) {
|
|
|
+ if (!excludesFile.isEmpty()) {
|
|
|
Set<String> newExcludes = new HashSet<String>();
|
|
|
readFileToSet(excludesFile, newExcludes);
|
|
|
// switch the excluded hosts
|