Changeset 4c2c198c


Ignore:
Timestamp:
Dec 5, 2011 4:17:09 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5362e7cf
Parents:
51899e9
Message:

cleanup

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  
    1010    /** @throws IllegalStateException if no context available */
    1111    public static RouterContext getContext(String contextId) {
    12         List contexts = RouterContext.listContexts();
     12        List<RouterContext> contexts = RouterContext.listContexts();
    1313        if ( (contexts == null) || (contexts.isEmpty()) )
    1414            throw new IllegalStateException("No contexts. This is usually because the router is either starting up or shutting down.");
    1515        if ( (contextId == null) || (contextId.trim().length() <= 0) )
    16             return (RouterContext)contexts.get(0);
     16            return contexts.get(0);
    1717        for (int i = 0; i < contexts.size(); i++) {
    18             RouterContext context = (RouterContext)contexts.get(i);
     18            RouterContext context = contexts.get(i);
    1919            Hash hash = context.routerHash();
    2020            if (hash == null) continue;
     
    2323        }
    2424        // not found, so just give them the first we can find
    25         return (RouterContext)contexts.get(0);
     25        return contexts.get(0);
    2626    }
    2727}
  • apps/routerconsole/java/src/net/i2p/router/web/StatSummarizer.java

    r51899e9 r4c2c198c  
    5353   
    5454    public StatSummarizer() {
    55         _context = (RouterContext)RouterContext.listContexts().get(0); // fuck it, only summarize one per jvm
     55        _context = RouterContext.listContexts().get(0); // fuck it, only summarize one per jvm
    5656        _log = _context.logManager().getLog(getClass());
    5757        _listeners = new CopyOnWriteArrayList();
Note: See TracChangeset for help on using the changeset viewer.