Ignore:
Timestamp:
2020-05-17T14:18:22+02:00 (4 years ago)
Author:
simon04
Message:

see #19251 - Java 8: use Stream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java

    r16398 r16438  
    2020import java.util.concurrent.TimeUnit;
    2121import java.util.stream.Collectors;
     22import java.util.stream.Stream;
    2223
    2324import javax.imageio.ImageIO;
     
    280281        // |  8  3  7  |
    281282        // +-----------+
    282         for (LatLon candidate : new LatLon[] {
     283        return Stream.of(
    283284                new LatLon(y1, x2),
    284285                new LatLon(y2, x3),
     
    289290                new LatLon(y3, x3),
    290291                new LatLon(y3, x1)
    291         }) {
    292             if (shape.contains(candidate)) {
    293                 return candidate;
    294             }
    295         }
    296         return center;
     292        ).filter(shape::contains).findFirst().orElse(center);
    297293    }
    298294
Note: See TracChangeset for help on using the changeset viewer.