Changeset 9163d41 for apps/jetty


Ignore:
Timestamp:
Feb 10, 2015 9:57:27 PM (5 years ago)
Author:
dg2-new <dg2-new@…>
Branches:
master
Children:
c52047e, f87d006
Parents:
1be9bb2
Message:
  • I2PSnark, Jetty, SAM, crypto: findbugs resource leaks.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/jetty/java/src/net/i2p/jetty/JettyStart.java

    r1be9bb2 r9163d41  
    2727import static net.i2p.app.ClientAppState.*;
    2828
     29import java.io.InputStream;
    2930import org.eclipse.jetty.util.component.LifeCycle;
    3031import org.eclipse.jetty.util.resource.Resource;
     
    6970        Properties properties=new Properties();
    7071        XmlConfiguration last=null;
     72        InputStream in = null;
    7173        for (int i = 0; i < args.length; i++) {
    7274            if (args[i].toLowerCase().endsWith(".properties")) {
    73                 properties.load(Resource.newResource(args[i]).getInputStream());
     75                in = Resource.newResource(args[i]).getInputStream();
     76                properties.load(in);
     77                in.close();
    7478            } else {
    7579                XmlConfiguration configuration = new XmlConfiguration(Resource.newResource(args[i]).getURL());
Note: See TracChangeset for help on using the changeset viewer.