Changeset 4c2c198c
- Timestamp:
- Dec 5, 2011 4:17:09 PM (9 years ago)
- Branches:
- master
- Children:
- 5362e7cf
- Parents:
- 51899e9
- Location:
- apps/routerconsole/java/src/net/i2p/router/web
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/routerconsole/java/src/net/i2p/router/web/ContextHelper.java
r51899e9 r4c2c198c 10 10 /** @throws IllegalStateException if no context available */ 11 11 public static RouterContext getContext(String contextId) { 12 List contexts = RouterContext.listContexts();12 List<RouterContext> contexts = RouterContext.listContexts(); 13 13 if ( (contexts == null) || (contexts.isEmpty()) ) 14 14 throw new IllegalStateException("No contexts. This is usually because the router is either starting up or shutting down."); 15 15 if ( (contextId == null) || (contextId.trim().length() <= 0) ) 16 return (RouterContext)contexts.get(0);16 return contexts.get(0); 17 17 for (int i = 0; i < contexts.size(); i++) { 18 RouterContext context = (RouterContext)contexts.get(i);18 RouterContext context = contexts.get(i); 19 19 Hash hash = context.routerHash(); 20 20 if (hash == null) continue; … … 23 23 } 24 24 // not found, so just give them the first we can find 25 return (RouterContext)contexts.get(0);25 return contexts.get(0); 26 26 } 27 27 } -
apps/routerconsole/java/src/net/i2p/router/web/StatSummarizer.java
r51899e9 r4c2c198c 53 53 54 54 public StatSummarizer() { 55 _context = (RouterContext)RouterContext.listContexts().get(0); // fuck it, only summarize one per jvm55 _context = RouterContext.listContexts().get(0); // fuck it, only summarize one per jvm 56 56 _log = _context.logManager().getLog(getClass()); 57 57 _listeners = new CopyOnWriteArrayList();
Note: See TracChangeset
for help on using the changeset viewer.