Changeset 7033 in josm for trunk/test/performance/org


Ignore:
Timestamp:
2014-05-01T02:34:43+02:00 (6 years ago)
Author:
Don-vip
Message:

see #8465 - global use of try-with-resources, according to

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/performance/org/openstreetmap/josm/data/osm/MapPaintVisitorPerformanceTest.java

    r5556 r7033  
    55import java.awt.image.BufferedImage;
    66import java.io.FileInputStream;
     7import java.io.InputStream;
    78
    89import org.junit.BeforeClass;
     
    4243        MapPaintStyles.readFromPreferences();
    4344
    44         dsRestriction = OsmReader.parseDataSet(new FileInputStream("data_nodist/restriction.osm"), NullProgressMonitor.INSTANCE);
    45         dsMultipolygon = OsmReader.parseDataSet(new FileInputStream("data_nodist/multipolygon.osm"), NullProgressMonitor.INSTANCE);
    46         dsCity = OsmReader.parseDataSet(new FileInputStream("data_nodist/neubrandenburg.osm"), NullProgressMonitor.INSTANCE);
     45        try (
     46            InputStream fisR = new FileInputStream("data_nodist/restriction.osm");
     47            InputStream fisM = new FileInputStream("data_nodist/multipolygon.osm");
     48            InputStream fisC = new FileInputStream("data_nodist/neubrandenburg.osm");
     49        ) {
     50            dsRestriction = OsmReader.parseDataSet(fisR, NullProgressMonitor.INSTANCE);
     51            dsMultipolygon = OsmReader.parseDataSet(fisM, NullProgressMonitor.INSTANCE);
     52            dsCity = OsmReader.parseDataSet(fisC, NullProgressMonitor.INSTANCE);
     53        }
    4754
    4855        // Warm up
     
    103110        test(200, dsCity, new Bounds(53.56, 13.295, 53.57, 13.30));
    104111    }
    105 
    106 
    107 
    108112}
Note: See TracChangeset for help on using the changeset viewer.