Changeset 16913 in josm for trunk/test


Ignore:
Timestamp:
2020-08-23T15:31:04+02:00 (5 years ago)
Author:
simon04
Message:

fix #19698 - Refactoring: make private fields final

Location:
trunk/test
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/data/imagery/ImageryCompareTestIT.java

    r16643 r16913  
    2020public class ImageryCompareTestIT {
    2121
    22     private static String BLACK_PREFIX = "<pre style=\"margin:3px;color:black\">";
    23     private static String RED_PREFIX = "<pre style=\"margin:3px;color:red\">";
     22    private static final String BLACK_PREFIX = "<pre style=\"margin:3px;color:black\">";
     23    private static final String RED_PREFIX = "<pre style=\"margin:3px;color:red\">";
    2424
    2525    /**
  • trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java

    r16235 r16913  
    6868    public JOSMTestRules test = new JOSMTestRules().preferences().projection();
    6969
    70     private TestConfig testConfig;
     70    private final TestConfig testConfig;
    7171
    7272    // development flag - set to true in order to update all reference images
  • trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java

    r15717 r16913  
    5252@SuppressFBWarnings(value = "CRLF_INJECTION_LOGS")
    5353public class MultiFetchServerObjectReaderTest {
    54     private static Logger logger = Logger.getLogger(MultiFetchServerObjectReader.class.getName());
     54    private static final Logger logger = Logger.getLogger(MultiFetchServerObjectReader.class.getName());
    5555
    5656    /**
  • trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java

    r14201 r16913  
    3434    private static final int STRING_INTERN_TESTS = 5000000;
    3535    private static final double[] TAG_NODE_RATIOS = new double[] {.05, .3, 3, 20, 200};
    36     private ArrayList<String> testStrings = new ArrayList<>();
     36    private final ArrayList<String> testStrings = new ArrayList<>();
    3737    private Random random;
    3838
  • trunk/test/performance/org/openstreetmap/josm/data/osm/OsmDataGenerator.java

    r16006 r16913  
    8080     */
    8181    public abstract static class DataGenerator {
    82         private String datasetName;
     82        private final String datasetName;
    8383        protected final Random random;
    8484        private DataSet ds;
  • trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java

    r10674 r16913  
    2525    private static class CssGenerator {
    2626        StringBuilder sb = new StringBuilder();
    27         private KeyValueDataGenerator generator;
     27        private final KeyValueDataGenerator generator;
    2828
    2929        /**
  • trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java

    r16006 r16913  
    3131public class OsmReaderPerformanceTest {
    3232    private static final int TIMES = 4;
    33     private static String DATA_FILE = "nodist/data/neubrandenburg.osm.bz2";
     33    private static final String DATA_FILE = "nodist/data/neubrandenburg.osm.bz2";
    3434
    3535    /**
  • trunk/test/unit/org/openstreetmap/josm/data/cache/HostLimitQueueTest.java

    r16398 r16913  
    3737     */
    3838    static class Task extends JCSCachedTileLoaderJob<String, CacheEntry> {
    39         private URL url;
    40         private AtomicInteger counter;
     39        private final URL url;
     40        private final AtomicInteger counter;
    4141
    4242        Task(ICacheAccess<String, CacheEntry> cache, URL url, AtomicInteger counter) {
  • trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java

    r16398 r16913  
    4444
    4545    private static class TestCachedTileLoaderJob extends JCSCachedTileLoaderJob<String, CacheEntry> {
    46         private String url;
    47         private String key;
     46        private final String url;
     47        private final String key;
    4848
    4949        TestCachedTileLoaderJob(String url, String key) {
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJobTest.java

    r16398 r16913  
    6666
    6767    private static class TestCachedTileLoaderJob extends TMSCachedTileLoaderJob {
    68         private String url;
    69         private String key;
     68        private final String url;
     69        private final String key;
    7070
    7171        TestCachedTileLoaderJob(TileLoaderListener listener, Tile tile, String key) throws IOException {
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java

    r14138 r16913  
    5353    public WireMockRule tileServer = new WireMockRule(WireMockConfiguration.options().dynamicPort());
    5454
    55     private ImageryInfo testImageryTMS = new ImageryInfo("test imagery", "http://localhost", "tms", null, null);
    56     private ImageryInfo testImageryPSEUDO_MERCATOR = getImagery(TestUtils.getTestDataRoot() + "wmts/getcapabilities-pseudo-mercator.xml");
    57     private ImageryInfo testImageryTOPO_PL = getImagery(TestUtils.getTestDataRoot() + "wmts/getcapabilities-TOPO.xml");
    58     private ImageryInfo testImageryORTO_PL = getImagery(TestUtils.getTestDataRoot() + "wmts/getcapabilities-ORTO.xml");
    59     private ImageryInfo testImageryWIEN = getImagery(TestUtils.getTestDataRoot() + "wmts/getCapabilities-wien.xml");
    60     private ImageryInfo testImageryWALLONIE = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-Wallonie.xml");
    61     private ImageryInfo testImageryOntario = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-Ontario.xml");
    62     private ImageryInfo testImageryGeoAdminCh = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-GeoAdminCh.xml");
    63     private ImageryInfo testImagery12168 = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12168-WMTSCapabilities.xml");
    64     private ImageryInfo testLotsOfLayers = getImagery(TestUtils.getTestDataRoot() + "wmts/getCapabilities-lots-of-layers.xml");
    65     private ImageryInfo testDuplicateTags = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12573-wmts-identifier.xml");
    66     private ImageryInfo testMissingStyleIdentifer = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12573-wmts-missing-style-identifier.xml");
    67     private ImageryInfo testMultipleTileMatrixForLayer = getImagery(TestUtils.getTestDataRoot() +
     55    private final ImageryInfo testImageryTMS = new ImageryInfo("test imagery", "http://localhost", "tms", null, null);
     56    private final ImageryInfo testImageryPSEUDO_MERCATOR = getImagery(TestUtils.getTestDataRoot() + "wmts/getcapabilities-pseudo-mercator.xml");
     57    private final ImageryInfo testImageryTOPO_PL = getImagery(TestUtils.getTestDataRoot() + "wmts/getcapabilities-TOPO.xml");
     58    private final ImageryInfo testImageryORTO_PL = getImagery(TestUtils.getTestDataRoot() + "wmts/getcapabilities-ORTO.xml");
     59    private final ImageryInfo testImageryWIEN = getImagery(TestUtils.getTestDataRoot() + "wmts/getCapabilities-wien.xml");
     60    private final ImageryInfo testImageryWALLONIE = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-Wallonie.xml");
     61    private final ImageryInfo testImageryOntario = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-Ontario.xml");
     62    private final ImageryInfo testImageryGeoAdminCh = getImagery(TestUtils.getTestDataRoot() + "wmts/WMTSCapabilities-GeoAdminCh.xml");
     63    private final ImageryInfo testImagery12168 = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12168-WMTSCapabilities.xml");
     64    private final ImageryInfo testLotsOfLayers = getImagery(TestUtils.getTestDataRoot() + "wmts/getCapabilities-lots-of-layers.xml");
     65    private final ImageryInfo testDuplicateTags = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12573-wmts-identifier.xml");
     66    private final ImageryInfo testMissingStyleIdentifer = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12573-wmts-missing-style-identifier.xml");
     67    private final ImageryInfo testMultipleTileMatrixForLayer = getImagery(TestUtils.getTestDataRoot() +
    6868            "wmts/bug13975-multiple-tile-matrices-for-one-layer-projection.xml");
    69     private ImageryInfo testImageryGisKtnGvAt = getImagery(TestUtils.getTestDataRoot() + "wmts/gis.ktn.gv.at.xml");
     69    private final ImageryInfo testImageryGisKtnGvAt = getImagery(TestUtils.getTestDataRoot() + "wmts/gis.ktn.gv.at.xml");
    7070
    7171    private static ImageryInfo getImagery(String path) {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java

    r14120 r16913  
    3333    }
    3434
    35     private DataSet dataSet = new DataSet();
     35    private final DataSet dataSet = new DataSet();
    3636
    3737    /**
  • trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java

    r13684 r16913  
    2121public class ProjectionTest {
    2222
    23     private static Random rand = new SecureRandom();
     23    private static final Random rand = new SecureRandom();
    2424
    2525    boolean error;
  • trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java

    r14138 r16913  
    1919public class SwissGridTest {
    2020    private static final String SWISS_EPSG_CODE = "EPSG:21781";
    21     private boolean debug = false;
     21    private final boolean debug = false;
    2222
    2323    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModelTest.java

    r14153 r16913  
    3636public class NodeListMergeModelTest {
    3737
    38     private DatasetFactory my = new DatasetFactory();
    39     private DatasetFactory their = new DatasetFactory();
     38    private final DatasetFactory my = new DatasetFactory();
     39    private final DatasetFactory their = new DatasetFactory();
    4040
    4141    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculatorTest.java

    r16886 r16913  
    3333public class WayConnectionTypeCalculatorTest {
    3434
    35     private RelationSorter sorter = new RelationSorter();
    36     private WayConnectionTypeCalculator wayConnectionTypeCalculator = new WayConnectionTypeCalculator();
     35    private final RelationSorter sorter = new RelationSorter();
     36    private final WayConnectionTypeCalculator wayConnectionTypeCalculator = new WayConnectionTypeCalculator();
    3737    private DataSet testDataset;
    3838
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java

    r15508 r16913  
    4646public class PluginHandlerTestIT {
    4747
    48     private static List<String> errorsToIgnore = new ArrayList<>();
     48    private static final List<String> errorsToIgnore = new ArrayList<>();
    4949    /**
    5050     * Setup test.
  • trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java

    r16727 r16913  
    726726    private static class FailOnTimeoutStatement extends Statement {
    727727
    728         private int timeout;
    729         private Statement original;
     728        private final int timeout;
     729        private final Statement original;
    730730
    731731        FailOnTimeoutStatement(Statement original, int timeout) {
     
    760760    private static final class TimeoutThread extends Thread {
    761761        public boolean isDone;
    762         private Statement original;
     762        private final Statement original;
    763763        private Throwable exceptionCaught;
    764764
Note: See TracChangeset for help on using the changeset viewer.