Changeset 12901 in josm for trunk/src/org


Ignore:
Timestamp:
2017-09-26T02:25:00+02:00 (7 years ago)
Author:
Don-vip
Message:

SonarQube - squid:S1612 - Lambdas should be replaced with method references

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r12873 r12901  
    503503    public static SplitWayResult splitWay(Way way, List<List<Node>> wayChunks,
    504504            Collection<? extends OsmPrimitive> selection, Strategy splitStrategy) {
    505         SplitWayCommand cmd = SplitWayCommand.splitWay(way, wayChunks, selection, x -> splitStrategy.determineWayToKeep(x));
     505        SplitWayCommand cmd = SplitWayCommand.splitWay(way, wayChunks, selection, splitStrategy::determineWayToKeep);
    506506        return cmd != null ? new SplitWayResult(cmd) : null;
    507507    }
  • trunk/src/org/openstreetmap/josm/command/SplitWayCommand.java

    r12869 r12901  
    3838public class SplitWayCommand extends SequenceCommand {
    3939
    40     private static volatile Consumer<String> warningNotifier = msg -> Logging.warn(msg);
     40    private static volatile Consumer<String> warningNotifier = Logging::warn;
    4141
    4242    /**
  • trunk/src/org/openstreetmap/josm/data/tagging/ac/AutoCompletionSet.java

    r12859 r12901  
    33
    44import java.util.Collection;
     5import java.util.Objects;
    56import java.util.Optional;
    67import java.util.TreeSet;
     
    4748     */
    4849    public boolean addAll(Collection<String> values, AutoCompletionPriority priority) {
    49         return addAll(values.stream().filter(v -> v != null).map(v -> new AutoCompletionItem(v, priority)).collect(Collectors.toList()));
     50        return addAll(values.stream().filter(Objects::nonNull).map(v -> new AutoCompletionItem(v, priority)).collect(Collectors.toList()));
    5051    }
    5152
Note: See TracChangeset for help on using the changeset viewer.