Ignore:
Timestamp:
2016-05-15T21:14:06+02:00 (8 years ago)
Author:
Don-vip
Message:

findbugs - fix/suppress most of warnings reported in unit tests + enable low confidence warnings for core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java

    r10219 r10222  
    1313import org.junit.Test;
    1414import org.openstreetmap.josm.JOSMFixture;
     15
     16import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1517
    1618/**
     
    5961            this.attributes = attributes;
    6062            this.ready = true;
    61             this.notify();
     63            this.notifyAll();
    6264        }
    6365    }
     
    7173    }
    7274
     75    /**
     76     * Test status codes
     77     * @throws InterruptedException in case of thread interruption
     78     * @throws IOException in case of I/O error
     79     */
    7380    @Test
    74     public void testStatusCodes() throws Exception {
     81    public void testStatusCodes() throws IOException, InterruptedException {
    7582        doTestStatusCode(200);
    7683        // can't test for 3xx, as httpstat.us redirects finally to 200 page
     
    8592    }
    8693
     94    /**
     95     * Test unknown host
     96     * @throws InterruptedException in case of thread interruption
     97     * @throws IOException in case of I/O error
     98     */
    8799    @Test
    88     public void testUnknownHost() throws Exception {
     100    @SuppressFBWarnings(value = "WA_NOT_IN_LOOP")
     101    public void testUnknownHost() throws IOException, InterruptedException {
    89102        TestCachedTileLoaderJob job = new TestCachedTileLoaderJob("http://unkownhost.unkownhost/unkown");
    90103        Listener listener = new Listener();
     
    98111    }
    99112
    100     private void doTestStatusCode(int responseCode) throws Exception {
     113    @SuppressFBWarnings(value = "WA_NOT_IN_LOOP")
     114    private void doTestStatusCode(int responseCode) throws IOException, InterruptedException {
    101115        TestCachedTileLoaderJob job = getStatusLoaderJob(responseCode);
    102116        Listener listener = new Listener();
Note: See TracChangeset for help on using the changeset viewer.