Changeset 16913 in josm for trunk


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

fix #19698 - Refactoring: make private fields final

Location:
trunk
Files:
77 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java

    r16442 r16913  
    363363         * Such as a^2 + b^2 = 1, ie (-b, a) is a unit vector of line
    364364         */
    365         private double a, b, c;
     365        private double a;
     366        private double b;
     367        private final double c;
    366368        /**
    367369         * (xM, yM) are coordinates of a point of the line
    368370         */
    369         private double xM, yM;
     371        private final double xM;
     372        private final double yM;
    370373
    371374        /**
  • trunk/src/org/openstreetmap/josm/actions/SaveAction.java

    r16630 r16913  
    3535 */
    3636public final class SaveAction extends SaveActionBase {
    37     private static SaveAction instance = new SaveAction();
     37    private static final SaveAction instance = new SaveAction();
    3838
    3939    private final PropertyChangeListener updateOnRequireSaveChange = evt -> {
  • trunk/src/org/openstreetmap/josm/actions/SaveAsAction.java

    r15496 r16913  
    1717 */
    1818public class SaveAsAction extends SaveActionBase {
    19     private static SaveAsAction instance = new SaveAsAction();
     19    private static final SaveAsAction instance = new SaveAsAction();
    2020
    2121    /**
  • trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java

    r16438 r16913  
    2222     * outer endpoints of selected ways
    2323     */
    24     private Set<Node> outerNodes;
     24    private final Set<Node> outerNodes;
    2525    /**
    2626     * endpoints of selected ways
    2727     */
    28     private Set<Node> nodes;
     28    private final Set<Node> nodes;
    2929
    3030    /**
  • trunk/src/org/openstreetmap/josm/data/APIDataSet.java

    r16436 r16913  
    3737public class APIDataSet {
    3838    private List<OsmPrimitive> toAdd;
    39     private List<OsmPrimitive> toUpdate;
     39    private final List<OsmPrimitive> toUpdate;
    4040    private List<OsmPrimitive> toDelete;
    4141
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r16643 r16913  
    9393    private Runnable finishTask;
    9494    private boolean force;
    95     private long minimumExpiryTime;
     95    private final long minimumExpiryTime;
    9696
    9797    /**
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxExtensionCollection.java

    r16553 r16913  
    2323    private static final long serialVersionUID = 1L;
    2424
    25     private Stack<GpxExtension> childStack = new Stack<>();
     25    private final Stack<GpxExtension> childStack = new Stack<>();
    2626    private IWithAttributes parent;
    2727
  • trunk/src/org/openstreetmap/josm/data/imagery/CachedTileLoaderFactory.java

    r16398 r16913  
    3030    public static final StringProperty PROP_TILECACHE_DIR = getTileCacheDir();
    3131    private final ICacheAccess<String, BufferedImageCacheEntry> cache;
    32     private Constructor<? extends TileLoader> tileLoaderConstructor;
     32    private final Constructor<? extends TileLoader> tileLoaderConstructor;
    3333
    3434    /**
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractDataSourceChangeEvent.java

    r16553 r16913  
    1515public abstract class AbstractDataSourceChangeEvent implements DataSourceChangeEvent {
    1616
    17     private DataSet source;
    18     private Set<DataSource> old;
     17    private final DataSet source;
     18    private final Set<DataSource> old;
    1919
    2020    /**
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r16387 r16913  
    5959     * @see #FLAG_DIRECTION_REVERSED
    6060     */
    61     private static volatile Match reversedDirectionKeys;
     61    private static final Match reversedDirectionKeys;
    6262
    6363    static {
  • trunk/src/org/openstreetmap/josm/data/osm/User.java

    r13101 r16913  
    2828     * the map of known users
    2929     */
    30     private static Map<Long, User> userMap = new HashMap<>();
     30    private static final Map<Long, User> userMap = new HashMap<>();
    3131
    3232    /**
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java

    r16553 r16913  
    3333public abstract class HistoryOsmPrimitive implements Tagged, Comparable<HistoryOsmPrimitive>, PrimitiveId {
    3434
    35     private long id;
    36     private boolean visible;
    37     private User user;
    38     private long changesetId;
     35    private final long id;
     36    private final boolean visible;
     37    private final User user;
     38    private final long changesetId;
    3939    private Changeset changeset;
    40     private Date timestamp;
    41     private long version;
     40    private final Date timestamp;
     41    private final long version;
    4242    private Map<String, String> tags;
    4343
  • trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java

    r16643 r16913  
    8080    private final boolean caseSensitive;
    8181    private final boolean regexSearch;
    82     private static String rxErrorMsg = marktr("The regex \"{0}\" had a parse error at offset {1}, full error:\n\n{2}");
    83     private static String rxErrorMsgNoPos = marktr("The regex \"{0}\" had a parse error, full error:\n\n{1}");
     82    private static final String rxErrorMsg = marktr("The regex \"{0}\" had a parse error at offset {1}, full error:\n\n{2}");
     83    private static final String rxErrorMsgNoPos = marktr("The regex \"{0}\" had a parse error, full error:\n\n{1}");
    8484    private final PushbackTokenizer tokenizer;
    85     private static Map<String, SimpleMatchFactory> simpleMatchFactoryMap = new HashMap<>();
    86     private static Map<String, UnaryMatchFactory> unaryMatchFactoryMap = new HashMap<>();
    87     private static Map<String, BinaryMatchFactory> binaryMatchFactoryMap = new HashMap<>();
     85    private static final Map<String, SimpleMatchFactory> simpleMatchFactoryMap = new HashMap<>();
     86    private static final Map<String, UnaryMatchFactory> unaryMatchFactoryMap = new HashMap<>();
     87    private static final Map<String, BinaryMatchFactory> binaryMatchFactoryMap = new HashMap<>();
    8888
    8989    static {
     
    230230
    231231    public static class CoreUnaryMatchFactory implements UnaryMatchFactory {
    232         private static Collection<String> keywords = Arrays.asList("parent", "child");
     232        private static final Collection<String> keywords = Arrays.asList("parent", "child");
    233233
    234234        @Override
     
    11671167     */
    11681168    public static class UserMatch extends Match {
    1169         private String user;
     1169        private final String user;
    11701170
    11711171        UserMatch(String user) {
     
    12191219     */
    12201220    private static class RoleMatch extends Match {
    1221         private String role;
     1221        private final String role;
    12221222
    12231223        RoleMatch(String role) {
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r16700 r16913  
    355355
    356356    //flag that activate wider highlight mode
    357     private boolean useWiderHighlight;
     357    private final boolean useWiderHighlight;
    358358
    359359    private boolean useStrokes;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java

    r15149 r16913  
    2525    public static final float NTV2_SOURCE_PRIORITY_DOWNLOAD = 5f;
    2626
    27     private static Map<Float, NTV2GridShiftFileSource> sources = new TreeMap<>(Collections.reverseOrder());
     27    private static final Map<Float, NTV2GridShiftFileSource> sources = new TreeMap<>(Collections.reverseOrder());
    2828
    2929    /**
  • trunk/src/org/openstreetmap/josm/data/validation/tests/SharpAngles.java

    r15463 r16913  
    3434    private double maxLength = 10.0; // meters
    3535    /** Specific highway types to ignore */
    36     private Collection<String> ignoreHighways = new TreeSet<>(
     36    private final Collection<String> ignoreHighways = new TreeSet<>(
    3737            Arrays.asList("platform", "rest_area", "services", "via_ferrata"));
    3838
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r16812 r16913  
    8888    private static volatile HashSet<String> additionalPresetsValueData;
    8989    /** often used tags which are not in presets */
    90     private static volatile MultiMap<String, String> oftenUsedTags = new MultiMap<>();
     90    private static final MultiMap<String, String> oftenUsedTags = new MultiMap<>();
    9191    private static final Map<TaggingPreset, List<TaggingPresetItem>> presetIndex = new LinkedHashMap<>();
    9292
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r14153 r16913  
    8585    private int toggleValue = -1;
    8686    private ConditionalOptionPaneUtil.MessagePanel togglePanel;
    87     private Component parent;
     87    private final Component parent;
    8888    private Component content;
    8989    private final String[] bTexts;
     
    9494    protected JButton defaultButton;
    9595    private transient Icon icon;
    96     private boolean modal;
     96    private final boolean modal;
    9797    private boolean focusOnDefaultButton;
    9898
  • trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java

    r15633 r16913  
    2626    private transient ShowHideButtonListener listener;
    2727    private boolean hideIfDisabled;
    28     private boolean isExpert;
     28    private final boolean isExpert;
    2929
    3030    /**
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r16800 r16913  
    737737            Policy.setPolicy(new Policy() {
    738738                // Permissions for plug-ins loaded when josm is started via webstart
    739                 private PermissionCollection pc;
     739                private final PermissionCollection pc;
    740740
    741741                {
  • trunk/src/org/openstreetmap/josm/gui/MenuScroller.java

    r16626 r16913  
    4343    private JPopupMenu menu;
    4444    private Component[] menuItems;
    45     private MenuScrollItem upItem;
    46     private MenuScrollItem downItem;
     45    private final MenuScrollItem upItem;
     46    private final MenuScrollItem downItem;
    4747    private final MenuScrollListener menuListener = new MenuScrollListener();
    4848    private final MouseWheelListener mouseWheelListener = new MouseScrollListener();
  • trunk/src/org/openstreetmap/josm/gui/NotificationManager.java

    r16313 r16913  
    6767    private final Deque<Notification> queue;
    6868
    69     private static IntegerProperty pauseTime = new IntegerProperty("notification-default-pause-time-ms", 300); // milliseconds
     69    private static final IntegerProperty pauseTime = new IntegerProperty("notification-default-pause-time-ms", 300); // milliseconds
    7070
    7171    private long displayTimeStart;
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java

    r16553 r16913  
    2525 */
    2626public abstract class PleaseWaitRunnable implements Runnable, CancelListener {
    27     private boolean ignoreException;
     27    private final boolean ignoreException;
    2828    private final String title;
    2929
  • trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java

    r16912 r16913  
    6060    }
    6161
    62     private static CopyOnWriteArrayList<TileSourceProvider> providers = new CopyOnWriteArrayList<>();
     62    private static final CopyOnWriteArrayList<TileSourceProvider> providers = new CopyOnWriteArrayList<>();
    6363    static {
    6464        addTileSourceProvider(new DefaultOsmTileSourceProvider());
  • trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapControler.java

    r14138 r16913  
    3737
    3838    /** How often to do the moving (milliseconds) */
    39     private static long timerInterval = 20;
     39    private static final long timerInterval = 20;
    4040
    4141    /** The maximum speed (pixels per timer interval) */
  • trunk/src/org/openstreetmap/josm/gui/bugreport/DebugTextDisplay.java

    r14273 r16913  
    2020    private static final String CODE_PATTERN = "{{{%n%s%n}}}";
    2121    private String text;
    22     private JosmTextArea textArea;
     22    private final JosmTextArea textArea;
    2323
    2424    /**
  • trunk/src/org/openstreetmap/josm/gui/correction/CorrectionTableModel.java

    r16553 r16913  
    1818
    1919    private final transient List<C> corrections;
    20     private boolean[] apply;
     20    private final boolean[] apply;
    2121    private final int applyColumn;
    2222
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r16888 r16913  
    150150
    151151    /** the preferred height if the toggle dialog is expanded */
    152     private int preferredHeight;
     152    private final int preferredHeight;
    153153
    154154    /** the JDialog displaying the toggle dialog as undocked dialog */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/layer/ActivateLayerAction.java

    r16790 r16913  
    2929implements IEnabledStateUpdating, ActiveLayerChangeListener, MultikeyShortcutAction {
    3030    private transient Layer layer;
    31     private transient Shortcut multikeyShortcut;
     31    private final transient Shortcut multikeyShortcut;
    3232    private final LayerListModel model;
    3333
  • trunk/src/org/openstreetmap/josm/gui/dialogs/layer/MergeAction.java

    r12643 r16913  
    2525 */
    2626public final class MergeAction extends AbstractAction implements IEnabledStateUpdating, LayerAction, Layer.MultiLayerAction {
    27     private transient Layer layer;
    28     private transient List<Layer> layers;
     27    private final transient Layer layer;
     28    private final transient List<Layer> layers;
    2929    private final LayerListModel model;
    3030
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java

    r16436 r16913  
    6565    private RelationTree childTree;
    6666    /**  the tree model */
    67     private transient RelationTreeModel model;
     67    private final transient RelationTreeModel model;
    6868
    6969    /** the osm data layer this browser is related to */
    70     private transient OsmDataLayer layer;
     70    private final transient OsmDataLayer layer;
    7171
    7272    /** the editAction used in the bottom panel and for doubleClick */
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadSourceSizingPolicy.java

    r14418 r16913  
    6868
    6969        private final AbstractProperty<Integer> preference;
    70         private IntSupplier minHeight;
     70        private final IntSupplier minHeight;
    7171
    7272        /**
  • trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java

    r16643 r16913  
    379379    public static class XMLCommandProcessor {
    380380
    381         private Preferences mainPrefs;
     381        private final Preferences mainPrefs;
    382382        private final Map<String, Element> tasksMap = new HashMap<>();
    383383        private final Map<String, String> environment = new HashMap<>();
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractCachedTileSourceLayer.java

    r16553 r16913  
    2626public abstract class AbstractCachedTileSourceLayer<T extends AbstractTMSTileSource> extends AbstractTileSourceLayer<T> {
    2727    /** loader factory responsible for loading tiles for all layers */
    28     private static Map<String, TileLoaderFactory> loaderFactories = new ConcurrentHashMap<>();
     28    private static final Map<String, TileLoaderFactory> loaderFactories = new ConcurrentHashMap<>();
    2929
    3030    private static final String PREFERENCE_PREFIX = "imagery.cache.";
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r16670 r16913  
    155155
    156156    /** additional layer menu actions */
    157     private static List<MenuAddition> menuAdditions = new LinkedList<>();
     157    private static final List<MenuAddition> menuAdditions = new LinkedList<>();
    158158
    159159    /** minimum zoom level to show to user */
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r16643 r16913  
    380380     */
    381381    public final DataSet data;
    382     private DataSetListenerAdapter dataSetListenerAdapter;
     382    private final DataSetListenerAdapter dataSetListenerAdapter;
    383383
    384384    /**
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r16548 r16913  
    7373        JumpToMarkerLayer, NavigatableComponent.ZoomChangeListener, ImageDataUpdateListener {
    7474
    75     private static List<Action> menuAdditions = new LinkedList<>();
     75    private static final List<Action> menuAdditions = new LinkedList<>();
    7676
    7777    private static volatile List<MapMode> supportedMapModes;
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java

    r16864 r16913  
    176176
    177177    // setup color maps used by heat map
    178     private static Color[] heatMapLutColorJosmInferno = createColorFromResource("inferno");
    179     private static Color[] heatMapLutColorJosmViridis = createColorFromResource("viridis");
    180     private static Color[] heatMapLutColorJosmBrown2Green = createColorFromResource("brown2green");
    181     private static Color[] heatMapLutColorJosmRed2Blue = createColorFromResource("red2blue");
    182 
    183     private static Color[] rtkLibQualityColors = {
     178    private static final Color[] heatMapLutColorJosmInferno = createColorFromResource("inferno");
     179    private static final Color[] heatMapLutColorJosmViridis = createColorFromResource("viridis");
     180    private static final Color[] heatMapLutColorJosmBrown2Green = createColorFromResource("brown2green");
     181    private static final Color[] heatMapLutColorJosmRed2Blue = createColorFromResource("red2blue");
     182
     183    private static final Color[] rtkLibQualityColors = {
    184184        Color.GREEN, // Fixed, solution by carrier‐based relative positioning and the integer ambiguity is properly resolved.
    185185        Color.ORANGE, // Float, solution by carrier‐based relative positioning but the integer ambiguity is not resolved.
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r16838 r16913  
    8282    }
    8383
    84     private static ElemStyles styles = new ElemStyles();
     84    private static final ElemStyles styles = new ElemStyles();
    8585
    8686    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java

    r16845 r16913  
    237237        p.add(more, GBC.std().insets(5, 5, 0, 0));
    238238        more.addActionListener(new ActionListener() {
    239             private JPopupMenu menu = buildPopupMenu();
     239            private final JPopupMenu menu = buildPopupMenu();
    240240            @Override
    241241            public void actionPerformed(ActionEvent ev) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/HeadersTable.java

    r16553 r16913  
    8181    }
    8282
    83     private List<String[]> headers;
     83    private final List<String[]> headers;
    8484
    8585    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java

    r16410 r16913  
    3737    }
    3838
    39     private transient PluginPreferencesModel model;
     39    private final transient PluginPreferencesModel model;
    4040
    4141    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/GaussKruegerProjectionChoice.java

    r12620 r16913  
    1616public class GaussKruegerProjectionChoice extends ListProjectionChoice {
    1717
    18     private static String[] zones = {"2", "3", "4", "5"};
     18    private static final String[] zones = {"2", "3", "4", "5"};
    1919
    2020    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertCC9ZonesProjectionChoice.java

    r16438 r16913  
    2323public class LambertCC9ZonesProjectionChoice extends ListProjectionChoice {
    2424
    25     private static String[] lambert9zones = {
     25    private static final String[] lambert9zones = {
    2626        tr("{0} ({1} to {2} degrees)", 1, 41, 43),
    2727        tr("{0} ({1} to {2} degrees)", 2, 42, 44),
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreference.java

    r9665 r16913  
    2929    }
    3030
    31     private static Set<ProxyPreferenceListener> listeners = new HashSet<>();
     31    private static final Set<ProxyPreferenceListener> listeners = new HashSet<>();
    3232
    3333    private ProxyPreferencesPanel pnlProxyPreferences;
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java

    r15586 r16913  
    7070    // A list of keys to present the user. Sadly this really is a list of keys Java knows about,
    7171    // not a list of real physical keys. If someone knows how to get that list?
    72     private static Map<Integer, String> keyList = setKeyList();
     72    private static final Map<Integer, String> keyList = setKeyList();
    7373
    7474    private final JCheckBox cbAlt = new JCheckBox();
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java

    r9816 r16913  
    1515
    1616    /** the list of values */
    17     private List<String> values;
     17    private final List<String> values;
    1818
    1919    /**
  • trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java

    r16438 r16913  
    4545
    4646    private final transient QuadStateDecorator cbModel;
    47     private State[] allowed;
     47    private final State[] allowed;
    4848    private final transient MouseListener mouseAdapter = new MouseAdapter() {
    4949        @Override
  • trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java

    r16442 r16913  
    3737
    3838    /** the id of the primitive whose referrers are to be read */
    39     private long id;
     39    private final long id;
    4040    /** the type of the primitive */
    41     private OsmPrimitiveType primitiveType;
     41    private final OsmPrimitiveType primitiveType;
    4242    /** true if this reader should complete incomplete primitives */
    4343    private boolean readFull;
  • trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java

    r16056 r16913  
    2828public class OsmServerObjectReader extends OsmServerReader {
    2929    /** the id of the object to download */
    30     private PrimitiveId id;
     30    private final PrimitiveId id;
    3131    /** true if a full download is required, i.e. a download including the immediate children */
    32     private boolean full;
     32    private final boolean full;
    3333    /** the specific version number, if required (incompatible with full), or -1 else */
    34     private int version;
     34    private final int version;
    3535
    3636    /**
  • trunk/src/org/openstreetmap/josm/io/audio/JavaSoundPlayer.java

    r12620 r16913  
    2828class JavaSoundPlayer implements SoundPlayer {
    2929
    30     private static int chunk = 4000; /* bytes */
     30    private static final int chunk = 4000; /* bytes */
    3131
    3232    private AudioInputStream audioInputStream;
  • trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java

    r16559 r16913  
    133133        private ImageryInfo mirrorEntry;
    134134        private ImageryBounds bounds;
    135         private Map<ImageryBounds, ImageryBounds> boundsInterner = new HashMap<>();
     135        private final Map<ImageryBounds, ImageryBounds> boundsInterner = new HashMap<>();
    136136        private Shape shape;
    137137        // language of last element, does only work for simple ENTRY_ATTRIBUTE's
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java

    r16825 r16913  
    8383     * can extend this list by using @see addRequestHandler
    8484     */
    85     private static Map<String, Class<? extends RequestHandler>> handlers = new TreeMap<>();
     85    private static final Map<String, Class<? extends RequestHandler>> handlers = new TreeMap<>();
    8686
    8787    static {
  • trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java

    r16865 r16913  
    5858public class SessionWriter {
    5959
    60     private static Map<Class<? extends Layer>, Class<? extends SessionLayerExporter>> sessionLayerExporters = new HashMap<>();
     60    private static final Map<Class<? extends Layer>, Class<? extends SessionLayerExporter>> sessionLayerExporters = new HashMap<>();
    6161
    6262    private final List<Layer> layers;
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r16873 r16913  
    9494    /** Map (english/locale) of plural strings **/
    9595    private static volatile Map<String, String[]> pstrings;
    96     private static Locale originalLocale = Locale.getDefault();
    97     private static Map<String, PluralMode> languages = new HashMap<>();
     96    private static final Locale originalLocale = Locale.getDefault();
     97    private static final Map<String, PluralMode> languages = new HashMap<>();
    9898    // NOTE: check also WikiLanguage handling in LanguageInfo.java when adding new languages
    9999    static {
  • trunk/src/org/openstreetmap/josm/tools/ListenableWeakReference.java

    r12798 r16913  
    1919    private static final ReferenceQueue<Object> GLOBAL_QUEUE = new ReferenceQueue<>();
    2020    private static Thread thread;
    21     private Runnable runOnDereference;
     21    private final Runnable runOnDereference;
    2222
    2323    /**
  • trunk/src/org/openstreetmap/josm/tools/OptionParser.java

    r16626 r16913  
    2222public class OptionParser {
    2323
    24     private HashMap<String, AvailableOption> availableOptions = new HashMap<>();
     24    private final HashMap<String, AvailableOption> availableOptions = new HashMap<>();
    2525    private final String program;
    2626
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r14689 r16913  
    306306
    307307    // here we store our shortcuts
    308     private static ShortcutCollection shortcuts = new ShortcutCollection();
     308    private static final ShortcutCollection shortcuts = new ShortcutCollection();
    309309
    310310    private static class ShortcutCollection extends CopyOnWriteArrayList<Shortcut> {
     
    331331
    332332    // and here our modifier groups
    333     private static Map<Integer, Integer> groups = new HashMap<>();
     333    private static final Map<Integer, Integer> groups = new HashMap<>();
    334334
    335335    // check if something collides with an existing shortcut
     
    387387
    388388    /* for reassignment */
    389     private static int[] mods = {ALT_CTRL, ALT_SHIFT, CTRL_SHIFT, ALT_CTRL_SHIFT};
    390     private static int[] keys = {KeyEvent.VK_F1, KeyEvent.VK_F2, KeyEvent.VK_F3, KeyEvent.VK_F4,
     389    private static final int[] mods = {ALT_CTRL, ALT_SHIFT, CTRL_SHIFT, ALT_CTRL_SHIFT};
     390    private static final int[] keys = {KeyEvent.VK_F1, KeyEvent.VK_F2, KeyEvent.VK_F3, KeyEvent.VK_F4,
    391391                                 KeyEvent.VK_F5, KeyEvent.VK_F6, KeyEvent.VK_F7, KeyEvent.VK_F8,
    392392                                 KeyEvent.VK_F9, KeyEvent.VK_F10, KeyEvent.VK_F11, KeyEvent.VK_F12};
  • trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportQueue.java

    r12808 r16913  
    9191    private class BugReportDisplayRunnable implements Runnable {
    9292
    93         private volatile boolean running = true;
     93        private final boolean running = true;
    9494
    9595        @Override
  • 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.