Changeset 14553 in josm for trunk/test/unit/org
- Timestamp:
- 2018-12-11T23:49:14+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
r14551 r14553 313 313 private static List<LayerDetails> firstLeafLayer(List<LayerDetails> layers) { 314 314 for (LayerDetails layer : layers) { 315 if (layer.getChildren().isEmpty()) { 315 boolean hasNoChildren = layer.getChildren().isEmpty(); 316 if (hasNoChildren && layer.getName() != null) { 316 317 return Collections.singletonList(layer); 317 } else {318 } else if (!hasNoChildren) { 318 319 return firstLeafLayer(layer.getChildren()); 319 320 } 320 321 } 321 return Collections.emptyList();322 throw new IllegalArgumentException("Unable to find a valid WMS layer"); 322 323 } 323 324
Note:
See TracChangeset
for help on using the changeset viewer.