Ignore:
Timestamp:
2013-09-27T19:50:29+02:00 (11 years ago)
Author:
Don-vip
Message:

Sonar/FindBugs - Bad practice - Method may fail to close stream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/gui/history/HistoryBrowserTest.java

    r5556 r6268  
    66import java.awt.BorderLayout;
    77import java.io.File;
     8import java.io.InputStream;
    89import java.text.MessageFormat;
    910import java.util.Properties;
     
    3738        //
    3839        try {
    39             testProperties.load(HistoryBrowserTest.class.getResourceAsStream("/test-functional-env.properties"));
     40            InputStream is = HistoryBrowserTest.class.getResourceAsStream("/test-functional-env.properties");
     41            testProperties.load(is);
     42            is.close();
    4043        } catch(Exception e){
    4144            logger.log(Level.SEVERE, MessageFormat.format("failed to load property file ''{0}''", "test-functional-env.properties"));
     
    8386    }
    8487
     88    /**
     89     * Constructs a new {@code HistoryBrowserTest}.
     90     */
    8591    public HistoryBrowserTest(){
    8692        build();
Note: See TracChangeset for help on using the changeset viewer.