Changeset 5f175455


Ignore:
Timestamp:
Oct 17, 2015 3:47:49 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
71bc55b
Parents:
9bddba5
Message:

lint console,streaming

Location:
apps
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java

    r9bddba5 r5f175455  
    257257            if (!I2PSocketManager.class.isAssignableFrom(cls))
    258258                throw new IllegalArgumentException(classname + " is not an I2PSocketManager");
    259             Constructor<I2PSocketManager> con = (Constructor<I2PSocketManager>)
    260                   cls.getConstructor(new Class[] {I2PAppContext.class, I2PSession.class, Properties.class, String.class});
    261             I2PSocketManager mgr = con.newInstance(new Object[] {context, session, opts, name});
     259            Constructor<?> con =
     260                  cls.getConstructor(I2PAppContext.class, I2PSession.class, Properties.class, String.class);
     261            I2PSocketManager mgr = (I2PSocketManager) con.newInstance(new Object[] {context, session, opts, name});
    262262            return mgr;
    263263        } catch (Throwable t) {
  • apps/routerconsole/java/src/net/i2p/router/news/NewsManager.java

    r9bddba5 r5f175455  
    6565    public synchronized List<NewsEntry> getEntries() {
    6666        if (!_currentNews.isEmpty())
    67             return new ArrayList(_currentNews);
     67            return new ArrayList<NewsEntry>(_currentNews);
    6868        // load old news.xml
    6969        if (_log.shouldWarn())
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHandler.java

    r9bddba5 r5f175455  
    44import java.io.IOException;
    55import java.util.Properties;
     6
     7import net.i2p.util.LogManager;
    68
    79/**
     
    114116       
    115117        if (_fileSize != null) {
    116             int newBytes = _context.logManager().getFileSize(_fileSize);
     118            int newBytes = LogManager.getFileSize(_fileSize);
    117119            int oldBytes = _context.logManager().getFileSize();
    118120            if (newBytes > 0) {
  • apps/routerconsole/java/src/net/i2p/router/web/FormHandler.java

    r9bddba5 r5f175455  
    2424    protected Log _log;
    2525    /** Not for multipart/form-data, will be null */
     26    @SuppressWarnings("rawtypes")
    2627    protected Map _settings;
    2728    /** Only for multipart/form-data. Warning, parameters are NOT XSS filtered */
     
    6465     * @since 0.9.4 consolidated from numerous FormHandlers
    6566     */
     67    @SuppressWarnings({"rawtypes", "unchecked"})
    6668    public void setSettings(Map settings) { _settings = new HashMap(settings); }
    6769
  • apps/routerconsole/java/src/net/i2p/router/web/LocaleWebAppHandler.java

    r9bddba5 r5f175455  
    8484                    String testPath = pathInContext.substring(0, len - 4) + '_' + lang + ".jsp";
    8585                    // Do we have a servlet for the new path that isn't the catchall *.jsp?
     86                    @SuppressWarnings("rawtypes")
    8687                    Map.Entry servlet = _wac.getServletHandler().getHolderEntry(testPath);
    8788                    if (servlet != null) {
     
    131132     *  Mysteriously removed from Jetty 7
    132133     */
    133     private void setInitParams(Map params) {
     134    private void setInitParams(Map<?,?> params) {
    134135        setInitParams(_wac, params);
    135136    }
     
    139140     */
    140141    public static void setInitParams(WebAppContext context, Map<?,?> params) {
    141         for (Map.Entry e : params.entrySet()) {
     142        for (Map.Entry<?,?> e : params.entrySet()) {
    142143            context.setInitParameter((String)e.getKey(), (String)e.getValue());
    143144        }
  • apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java

    r9bddba5 r5f175455  
    265265     *  @throws just about anything, caller would be wise to catch Throwable
    266266     */
     267    @SuppressWarnings("deprecation")
    267268    public static boolean startPlugin(RouterContext ctx, String appName) throws Exception {
    268269        Log log = ctx.logManager().getLog(PluginStarter.class);
     
    345346            for (int i = 0; i < tfiles.length; i++) {
    346347                String name = tfiles[i].getName();
    347                 if (tfiles[i].isDirectory() && (!Arrays.asList(STANDARD_THEMES).contains(tfiles[i])))
     348                if (tfiles[i].isDirectory() && (!Arrays.asList(STANDARD_THEMES).contains(tfiles[i]))) {
     349                    // deprecated
    348350                    ctx.router().setConfigSetting(ConfigUIHelper.PROP_THEME_PFX + name, tfiles[i].getAbsolutePath());
    349351                    // we don't need to save
     352                }
    350353            }
    351354        }
     
    544547        boolean deleted = FileUtil.rmdir(pluginDir, false);
    545548        Properties props = pluginProperties();
    546         for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) {
     549        for (Iterator<?> iter = props.keySet().iterator(); iter.hasNext(); ) {
    547550            String name = (String)iter.next();
    548551            if (name.startsWith(PREFIX + appName + '.'))
     
    974977        URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
    975978        Class<URLClassLoader> urlClass = URLClassLoader.class;
    976         Method method = urlClass.getDeclaredMethod("addURL", new Class[]{URL.class});
     979        Method method = urlClass.getDeclaredMethod("addURL", URL.class);
    977980        method.setAccessible(true);
    978981        method.invoke(urlClassLoader, new Object[]{u});
  • apps/routerconsole/java/src/net/i2p/router/web/TunnelRenderer.java

    r9bddba5 r5f175455  
    213213        out.write("</table>\n");
    214214        if (in != null) {
    215             List pending = in.listPending();
     215            // PooledTunnelCreatorConfig
     216            List<?> pending = in.listPending();
    216217            if (!pending.isEmpty()) {
    217218                out.write("<div class=\"statusnotes\"><center><b>" + _t("Build in progress") + ": " + pending.size() + " " + _t("inbound") + "</b></center></div>\n");
     
    220221        }
    221222        if (outPool != null) {
    222             List pending = outPool.listPending();
     223            // PooledTunnelCreatorConfig
     224            List<?> pending = outPool.listPending();
    223225            if (!pending.isEmpty()) {
    224226                out.write("<div class=\"statusnotes\"><center><b>" + _t("Build in progress") + ": " + pending.size() + " " + _t("outbound") + "</b></center></div>\n");
Note: See TracChangeset for help on using the changeset viewer.