Changeset 9205 in josm


Ignore:
Timestamp:
2015-12-28T21:25:25+01:00 (8 years ago)
Author:
Don-vip
Message:

fix some Findbugs warnings

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/.classpath

    r8632 r9205  
    2727        <classpathentry kind="lib" path="test/lib/fest/debug-1.0.jar"/>
    2828        <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
     29        <classpathentry kind="lib" path="tools/findbugs/annotations.jar"/>
    2930        <classpathentry kind="output" path="bin"/>
    3031</classpath>
  • trunk/build.xml

    r9133 r9205  
    301301        <pathelement path="dist/josm-custom.jar"/>
    302302        <pathelement path="${groovy.jar}"/>
     303        <pathelement path="tools/findbugs/annotations.jar"/>
    303304    </path>
    304305    <macrodef name="init-test-preferences">
  • trunk/src/org/openstreetmap/josm/Main.java

    r9087 r9205  
    556556        main = this;
    557557        isOpenjdk = System.getProperty("java.vm.name").toUpperCase(Locale.ENGLISH).indexOf("OPENJDK") != -1;
     558        fileWatcher.start();
    558559
    559560        new InitializationTask(tr("Executing platform startup hook")) {
  • trunk/src/org/openstreetmap/josm/io/FileWatcher.java

    r8510 r9205  
    3131
    3232    private WatchService watcher;
     33    private Thread thread;
    3334
    3435    private final Map<Path, StyleSource> styleMap = new HashMap<>();
     
    4142        try {
    4243            watcher = FileSystems.getDefault().newWatchService();
    43             new Thread(new Runnable() {
     44            thread = new Thread(new Runnable() {
    4445                @Override
    4546                public void run() {
    4647                    processEvents();
    4748                }
    48             }, "File Watcher").start();
     49            }, "File Watcher");
    4950        } catch (IOException e) {
    5051            Main.error(e);
     52        }
     53    }
     54
     55    /**
     56     * Starts the File Watcher thread.
     57     */
     58    public final void start() {
     59        if (!thread.isAlive()) {
     60            thread.start();
    5161        }
    5262    }
  • trunk/test/performance/org/openstreetmap/josm/PerformanceTestUtils.java

    r8632 r9205  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm;
     3
     4import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    35
    46/**
     
    3739     * @return A {@link PerformanceTestTimer} object of which you can call {@link PerformanceTestTimer#done()} when done.
    3840     */
     41    @SuppressFBWarnings(value = "DM_GC", justification = "Performance test code")
    3942    public static PerformanceTestTimer startTimer(String name) {
    4043        System.gc();
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java

    r8949 r9205  
    3636        @Override
    3737        public synchronized int getInteger(String key, int def) {
    38             if (key == "edit.initial-move-delay") {
     38            if ("edit.initial-move-delay".equals(key)) {
    3939                return 0;
    4040            } else {
Note: See TracChangeset for help on using the changeset viewer.