Changeset 11886 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
r11746 r11886 135 135 private int firstGroupIdx; 136 136 private void makeLoopIfNeeded(final List<WayConnectionType> con, final int i) { 137 boolean loop ;137 boolean loop = false; 138 138 if (i == firstGroupIdx) { //is primitive loop 139 139 loop = determineDirection(i, FORWARD, i) == FORWARD; 140 } else {140 } else if (i >= 0) { 141 141 loop = determineDirection(i, con.get(i).direction, firstGroupIdx) == con.get(firstGroupIdx).direction; 142 142 } -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculatorTest.java
r10876 r11886 5 5 import java.io.IOException; 6 6 import java.io.InputStream; 7 import java.util.ArrayList; 7 8 import java.util.Arrays; 8 9 import java.util.List; … … 97 98 98 99 @Test 100 public void testEmpty() { 101 String actual = getConnections(wayConnectionTypeCalculator.updateLinks(new ArrayList<>())); 102 Assert.assertEquals("[]", actual); 103 } 104 105 @Test 99 106 public void testGeneric() { 100 107 Relation relation = getRelation("generic");
Note:
See TracChangeset
for help on using the changeset viewer.