Permalink
Browse files

housekeeping around TODOs

  • Loading branch information...
1 parent ab15db0 commit cc0f311c2769b5ab2aea59137eec17866e4545d5 @szczepiq szczepiq committed Aug 31, 2011
@@ -45,18 +45,14 @@ public PersistentDaemonRegistry(File baseFolder) {
}
public synchronized List<DaemonStatus> getAll() {
- //TODO SF ugly
- if (!daemonDir.getRegistry().exists()) {
+ DaemonRegistryContent content = cache.get();
+ if (content == null) {
+ //when no daemon process has started yet
return new LinkedList<DaemonStatus>();
}
- DaemonRegistryContent content = registry();
return content.getDaemonStatuses();
}
- private DaemonRegistryContent registry() {
- return cache.get();
- }
-
//daemons without active connection
public synchronized List<DaemonStatus> getIdle() {
List<DaemonStatus> out = new LinkedList<DaemonStatus>();

0 comments on commit cc0f311

Please sign in to comment.