Changeset 6289 in josm for trunk/test/functional


Ignore:
Timestamp:
2013-10-03T03:41:25+02:00 (6 years ago)
Author:
Don-vip
Message:

Sonar/Findbugs - fix various problems

Location:
trunk/test/functional/org/openstreetmap/josm
Files:
3 edited

Legend:

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

    r6268 r6289  
    3939        try {
    4040            InputStream is = HistoryBrowserTest.class.getResourceAsStream("/test-functional-env.properties");
    41             testProperties.load(is);
    42             is.close();
     41            try {
     42                testProperties.load(is);
     43            } finally {
     44                is.close();
     45            }
    4346        } catch(Exception e){
    4447            logger.log(Level.SEVERE, MessageFormat.format("failed to load property file ''{0}''", "test-functional-env.properties"));
  • trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java

    r6268 r6289  
    140140        try {
    141141            InputStream is = MultiFetchServerObjectReaderTest.class.getResourceAsStream("/test-functional-env.properties");
    142             testProperties.load(is);
    143             is.close();
     142            try {
     143                testProperties.load(is);
     144            } finally {
     145                is.close();
     146            }
    144147        } catch(Exception e){
    145148            logger.log(Level.SEVERE, MessageFormat.format("failed to load property file ''{0}''", "test-functional-env.properties"));
  • trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java

    r6268 r6289  
    147147        try {
    148148            InputStream is = MultiFetchServerObjectReaderTest.class.getResourceAsStream("/test-functional-env.properties");
    149             testProperties.load(is);
    150             is.close();
     149            try {
     150                testProperties.load(is);
     151            } finally {
     152                is.close();
     153            }
    151154        } catch(Exception e){
    152155            logger.log(Level.SEVERE, MessageFormat.format("failed to load property file ''{0}''", "test-functional-env.properties"));
Note: See TracChangeset for help on using the changeset viewer.