Ignore:
Timestamp:
2016-01-02T14:22:20+01:00 (9 years ago)
Author:
donvip
Message:

[josm_mapillary] fix warnings

Location:
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillaryDataTest.java

    r31882 r31909  
    4545
    4646    this.data = new MapillaryData();
    47     this.data.add(new ConcurrentSkipListSet(this.seq.getImages()));
     47    this.data.add(new ConcurrentSkipListSet<>(this.seq.getImages()));
    4848  }
    4949
     
    6060    this.data.add(this.img1);
    6161    assertEquals(1, this.data.getImages().size());
    62     this.data.add(new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[] { this.img2,
     62    this.data.add(new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[] { this.img2,
    6363        this.img3 })));
    6464    assertEquals(3, this.data.getImages().size());
    65     this.data.add(new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[] { this.img3,
     65    this.data.add(new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[] { this.img3,
    6666        this.img4 })));
    6767    assertEquals(4, this.data.getImages().size());
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSettingTest.java

    r31823 r31909  
    5656  }
    5757
    58   private Object getPrivateField(MapillaryPreferenceSetting object, String name) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException {
     58  private static Object getPrivateField(MapillaryPreferenceSetting object, String name) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException {
    5959    Field field = object.getClass().getDeclaredField(name);
    6060    field.setAccessible(true);
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/history/MapillaryRecordTest.java

    r31882 r31909  
    1616import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
    1717import org.openstreetmap.josm.plugins.mapillary.MapillaryLayer;
    18 import org.openstreetmap.josm.plugins.mapillary.history.MapillaryRecord;
    1918import org.openstreetmap.josm.plugins.mapillary.history.commands.CommandDelete;
    2019import org.openstreetmap.josm.plugins.mapillary.history.commands.CommandImport;
     
    5655  public void commandTest() {
    5756    MapillaryCommand cmd12 = new CommandMove(
    58             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
     57            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
    5958            0.1, 0.1);
    6059    MapillaryCommand cmd23 = new CommandMove(
    61             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3})),
     60            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3})),
    6261            0.1, 0.1);
    6362    MapillaryCommand cmd13 = new CommandMove(
    64             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img3})),
     63            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img3})),
    6564            0.1, 0.1);
    6665    MapillaryCommand cmd1 = new CommandMove(
    67             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1})), 0.1, 0.1);
     66            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1})), 0.1, 0.1);
    6867    MapillaryCommand cmd31 = new CommandMove(
    69             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img3, this.img1})),
     68            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img3, this.img1})),
    7069            0.2, 0.2);
    7170    this.record.addCommand(cmd12);
     
    112111  public void commandMoveTest() {
    113112    CommandMove cmd1 = new CommandMove(
    114             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
     113            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
    115114            0.1, 0.1);
    116115    CommandMove cmd2 = new CommandMove(
    117             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
     116            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
    118117            0.1, 0.1);
    119118
     
    146145  public void commandTurnTest() {
    147146    CommandTurn cmd1 = new CommandTurn(
    148             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
     147            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
    149148            0.2);
    150149    CommandTurn cmd2 = new CommandTurn(
    151             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
     150            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})),
    152151            0.1);
    153152
     
    253252
    254253    CommandDelete cmd1 = new CommandDelete(
    255             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1})));
     254            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1})));
    256255    CommandDelete cmd2 = new CommandDelete(
    257             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3})));
     256            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3})));
    258257
    259258    this.record.addCommand(join1);
     
    264263            .getData()
    265264            .add(
    266                     new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2,
     265                    new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2,
    267266                            this.img3})));
    268267
     
    286285
    287286    CommandImport cmd1 = new CommandImport(
    288             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1})));
     287            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1})));
    289288    CommandImport cmd2 = new CommandImport(
    290             new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3})));
     289            new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3})));
    291290
    292291    this.record.addCommand(cmd1);
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/traffico/TrafficoSignElementTest.java

    r31793 r31909  
    11package org.openstreetmap.josm.plugins.mapillary.traffico;
    22
    3 import static org.junit.Assert.*;
     3import static org.junit.Assert.assertEquals;
     4import static org.junit.Assert.assertNotNull;
    45
    56import java.awt.Color;
     
    2122  @Test(expected=IllegalArgumentException.class)
    2223  public void testNullColor() {
    23     new TrafficoSignElement('\ufeed', null);
     24    assertNotNull(new TrafficoSignElement('\ufeed', null));
    2425  }
    2526
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryURLTest.java

    r31833 r31909  
    183183  }
    184184
    185   private void assertUrlEquals(URL actualUrl, String expectedBaseUrl, String... expectedParams) {
     185  private static void assertUrlEquals(URL actualUrl, String expectedBaseUrl, String... expectedParams) {
    186186    assertEquals(expectedBaseUrl, actualUrl.toString().substring(0, actualUrl.toString().indexOf('?')));
    187187    String[] actualParams = actualUrl.getQuery().split("&");
Note: See TracChangeset for help on using the changeset viewer.