Ignore:
Timestamp:
2013-12-11T00:51:08+01:00 (6 years ago)
Author:
Don-vip
Message:

Sonar - remove warnings related to the static preferences initialization in instance methods

Location:
trunk/test/unit/org/openstreetmap/josm/tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java

    r5756 r6471  
    1515    @BeforeClass
    1616    public static void before() {
    17         Main.pref = new Preferences();
     17        Main.initApplicationPreferences();
    1818    }
    1919
  • trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java

    r6421 r6471  
    7474    @Test
    7575    public void testOpenUrlGzip() throws Exception {
    76         Main.pref = new Preferences();
     76        Main.initApplicationPreferences();
    7777        final BufferedReader x = Utils.openURLReaderAndDecompress(new URL("http://www.openstreetmap.org/trace/1613906/data"), true);
    7878        Assert.assertTrue(x.readLine().startsWith("<?xml version="));
     
    8282    @Test
    8383    public void testOpenUrlBzip() throws Exception {
    84         Main.pref = new Preferences();
     84        Main.initApplicationPreferences();
    8585        final BufferedReader x = Utils.openURLReaderAndDecompress(new URL("http://www.openstreetmap.org/trace/785544/data"), true);
    8686        Assert.assertTrue(x.readLine().startsWith("<?xml version="));
  • trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java

    r6289 r6471  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.tools.template_engine;
    3 
    43
    54import java.util.Arrays;
     
    1211import org.openstreetmap.josm.actions.search.SearchCompiler;
    1312import org.openstreetmap.josm.actions.search.SearchCompiler.Match;
    14 import org.openstreetmap.josm.data.Preferences;
    1513import org.openstreetmap.josm.data.osm.DatasetFactory;
    1614import org.openstreetmap.josm.data.osm.Node;
     
    2321    @BeforeClass
    2422    public static void before() {
    25         Main.pref = new Preferences();
     23        Main.initApplicationPreferences();
    2624    }
    2725
Note: See TracChangeset for help on using the changeset viewer.