Ignore:
Timestamp:
2016-07-25T21:19:38+02:00 (3 years ago)
Author:
Don-vip
Message:

see #11390, fix #13206 - Migrate Function interface to java 8 (patch by michael2402, modified) - gsoc-core

Location:
trunk/src/org/openstreetmap/josm/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java

    r10615 r10638  
    77import java.text.MessageFormat;
    88import java.text.ParseException;
    9 import java.util.Arrays;
    109import java.util.Collection;
    1110import java.util.Collections;
    1211import java.util.Date;
    1312import java.util.HashMap;
    14 import java.util.HashSet;
    1513import java.util.Map;
    1614import java.util.Map.Entry;
     15import java.util.stream.Collectors;
     16import java.util.stream.Stream;
    1717
    1818import org.openstreetmap.josm.Main;
     
    2121import org.openstreetmap.josm.tools.CheckParameterUtil;
    2222import org.openstreetmap.josm.tools.Utils;
    23 import org.openstreetmap.josm.tools.Utils.Function;
    2423import org.openstreetmap.josm.tools.date.DateUtils;
    2524
     
    405404
    406405        protected Collection<Long> parseLongs(String value) {
    407             return value == null || value.isEmpty()
    408                     ? Collections.<Long>emptySet() :
    409                     new HashSet<>(Utils.transform(Arrays.asList(value.split(",")), (Function<String, Long>) x -> Long.valueOf(x)));
     406            if (value == null || value.isEmpty()) {
     407                return Collections.<Long>emptySet();
     408            } else {
     409                return Stream.of(value.split(",")).map(Long::valueOf).collect(Collectors.toSet());
     410            }
    410411        }
    411412
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java

    r10615 r10638  
    180180        return buildRootUrl() + "FORMAT=" + format + (imageFormatHasTransparency(format) ? "&TRANSPARENT=TRUE" : "")
    181181                + "&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS="
    182                 + Utils.join(",", Utils.transform(selectedLayers, x -> x.ident))
     182                + selectedLayers.stream().map(x -> x.ident).collect(Collectors.joining(","))
    183183                + "&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}";
    184184    }
Note: See TracChangeset for help on using the changeset viewer.