Ignore:
Timestamp:
2020-05-17T12:08:17+02:00 (5 years ago)
Author:
simon04
Message:

see #19251 - Java 8: use Stream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/APIDataSet.java

    r13164 r16436  
    267267        List<Relation> ret = new LinkedList<>();
    268268        for (Relation relation: relations) {
    269             boolean refersToNewRelation = false;
    270             for (RelationMember m : relation.getMembers()) {
    271                 if (m.isRelation() && m.getMember().isNewOrUndeleted()) {
    272                     refersToNewRelation = true;
    273                     break;
    274                 }
    275             }
     269            boolean refersToNewRelation = relation.getMembers().stream()
     270                    .anyMatch(m -> m.isRelation() && m.getMember().isNewOrUndeleted());
    276271            if (!refersToNewRelation) {
    277272                ret.add(relation);
Note: See TracChangeset for help on using the changeset viewer.