From abf49ffdab8a0b62508e80d87b8e93bc0ca1e8bf Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Wed, 13 Jan 2021 16:59:02 -0700 Subject: [PATCH] ConnectedCommandTest: Fix lint issue (easier test to debug) Signed-off-by: Taylor Smock --- .../plugins/mapwithai/commands/ConnectedCommandTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/unit/org/openstreetmap/josm/plugins/mapwithai/commands/ConnectedCommandTest.java b/test/unit/org/openstreetmap/josm/plugins/mapwithai/commands/ConnectedCommandTest.java index 08ed4a5..375d467 100644 --- a/test/unit/org/openstreetmap/josm/plugins/mapwithai/commands/ConnectedCommandTest.java +++ b/test/unit/org/openstreetmap/josm/plugins/mapwithai/commands/ConnectedCommandTest.java @@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import java.util.Collection; import java.util.Collections; import org.junit.jupiter.api.Test; @@ -14,6 +15,7 @@ import org.openstreetmap.josm.command.Command; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; +import org.openstreetmap.josm.data.osm.OsmPrimitive; import org.openstreetmap.josm.data.osm.Way; import org.openstreetmap.josm.testutils.JOSMTestRules; @@ -38,7 +40,8 @@ class ConnectedCommandTest { Node toAdd = new Node(new LatLon(0.5, 0)); ds.addPrimitive(toAdd); - assertThrows(NullPointerException.class, () -> command.getCommand(Collections.singletonList(toAdd))); + Collection temporaryList = Collections.singletonList(toAdd); + assertThrows(NullPointerException.class, () -> command.getCommand(temporaryList)); // SimplePrimitiveId doesn't like negative ids way.setOsmId(1, 1);