Changeset 14068 in josm for trunk


Ignore:
Timestamp:
2018-08-01T00:08:06+02:00 (10 months ago)
Author:
Don-vip
Message:

checkstyle/sonarqube

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java

    r14055 r14068  
    163163            try {
    164164                final Object obj = get(PT_TIME);
    165                 final Date time = obj instanceof Date ? (Date) obj : DateUtils.fromString(obj.toString());
    166                 this.time = time.getTime() / 1000.;
    167                 return time;
     165                final Date date = obj instanceof Date ? (Date) obj : DateUtils.fromString(obj.toString());
     166                time = date.getTime() / 1000.;
     167                return date;
    168168            } catch (UncheckedParseException e) {
    169169                Logging.warn(e);
  • trunk/src/org/openstreetmap/josm/gui/progress/swing/ProgressMonitorExecutor.java

    r14052 r14068  
    5151                t = cancellationException;
    5252            } catch (ExecutionException executionException) {
     53                Logging.trace(executionException);
    5354                t = executionException.getCause();
    5455            } catch (InterruptedException interruptedException) {
  • trunk/test/unit/org/openstreetmap/josm/TestUtils.java

    r14052 r14068  
    22package org.openstreetmap.josm;
    33
     4import static org.junit.Assert.assertArrayEquals;
    45import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertArrayEquals;
    66import static org.junit.Assert.assertTrue;
    77import static org.junit.Assert.fail;
     
    5252import com.github.tomakehurst.wiremock.WireMockServer;
    5353import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
    54 
    5554import com.google.common.io.ByteStreams;
    5655
     
    460459            }
    461460        } catch (IOException e) {
    462             fail(e.toString());
     461            throw new RuntimeException(e);
    463462        }
    464463    }
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java

    r14066 r14068  
    1010import org.junit.Test;
    1111import org.openstreetmap.josm.data.gpx.GpxData;
    12 import org.openstreetmap.josm.data.imagery.ImageryInfo;
    1312import org.openstreetmap.josm.gui.MainApplication;
    1413import org.openstreetmap.josm.gui.layer.GpxLayerTest;
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/AllMappaintTests.java

    r14048 r14068  
    55import org.junit.runners.Suite;
    66import org.openstreetmap.josm.gui.mappaint.mapcss.AllMapCSSTests;
    7 
    8 import junit.framework.TestCase;
    97
    108/**
     
    1715    AllMapCSSTests.class
    1816})
    19 public class AllMappaintTests extends TestCase{
     17public class AllMappaintTests {
    2018
    2119}
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/AllMapCSSTests.java

    r14048 r14068  
    44import org.junit.runner.RunWith;
    55import org.junit.runners.Suite;
    6 
    7 import junit.framework.TestCase;
    86
    97/**
     
    1816    ChildOrParentSelectorTest.class
    1917})
    20 public class AllMapCSSTests extends TestCase{
     18public class AllMapCSSTests {
    2119
    2220}
  • trunk/test/unit/org/openstreetmap/josm/io/ChangesetQueryUrlParserTest.java

    r14040 r14068  
    33
    44import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.assertFalse;
    56import static org.junit.Assert.assertNotNull;
    67import static org.junit.Assert.assertTrue;
     
    9596        q = parser.parse("open=true");
    9697        assertNotNull(q);
    97         assertEquals(Boolean.TRUE, q.getRestrictionToOpen());
     98        assertTrue(q.getRestrictionToOpen());
    9899
    99100        // OK
    100101        q = parser.parse("open=false");
    101102        assertNotNull(q);
    102         assertEquals(Boolean.FALSE, q.getRestrictionToOpen());
     103        assertFalse(q.getRestrictionToOpen());
    103104
    104105        // illegal value for open
     
    118119        q = parser.parse("closed=true");
    119120        assertNotNull(q);
    120         assertEquals(Boolean.TRUE, q.getRestrictionToClosed());
     121        assertTrue(q.getRestrictionToClosed());
    121122
    122123        // OK
    123124        q = parser.parse("closed=false");
    124125        assertNotNull(q);
    125         assertEquals(Boolean.FALSE, q.getRestrictionToClosed());
     126        assertFalse(q.getRestrictionToClosed());
    126127
    127128        // illegal value for open
  • trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java

    r14067 r14068  
    172172    @Test
    173173    public void testTicket16496() throws Exception {
    174         assertEquals("2018-05-30T16:28:59.400Z", iso8601.format(readDate("$GNRMC,162859.400,A,4543.03388,N,00058.19870,W,45.252,209.07,300518,,,D,V*13")));
    175         assertEquals("2018-05-30T16:28:59.400Z", iso8601.format(readDate("$GNRMC,162859.40,A,4543.03388,N,00058.19870,W,45.252,209.07,300518,,,D,V*23")));
    176         assertEquals("2018-05-30T16:28:59.400Z", iso8601.format(readDate("$GNRMC,162859.4,A,4543.03388,N,00058.19870,W,45.252,209.07,300518,,,D,V*13")));
     174        assertEquals("2018-05-30T16:28:59.400Z", iso8601.format(
     175                readDate("$GNRMC,162859.400,A,4543.03388,N,00058.19870,W,45.252,209.07,300518,,,D,V*13")));
     176        assertEquals("2018-05-30T16:28:59.400Z", iso8601.format(
     177                readDate("$GNRMC,162859.40,A,4543.03388,N,00058.19870,W,45.252,209.07,300518,,,D,V*23")));
     178        assertEquals("2018-05-30T16:28:59.400Z", iso8601.format(
     179                readDate("$GNRMC,162859.4,A,4543.03388,N,00058.19870,W,45.252,209.07,300518,,,D,V*13")));
    177180    }
    178181}
Note: See TracChangeset for help on using the changeset viewer.