Index: /trunk/src/org/openstreetmap/josm/data/preferences/sources/SourcePrefHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/preferences/sources/SourcePrefHelper.java	(revision 15753)
+++ /trunk/src/org/openstreetmap/josm/data/preferences/sources/SourcePrefHelper.java	(revision 15754)
@@ -8,4 +8,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
@@ -70,17 +71,11 @@
      */
     public List<SourceEntry> get() {
-
         List<Map<String, String>> src = Config.getPref().getListOfMaps(pref, null);
         if (src == null)
             return new ArrayList<>(getDefault());
-
-        List<SourceEntry> entries = new ArrayList<>();
-        for (Map<String, String> sourcePref : src) {
-            SourceEntry e = deserialize(new HashMap<>(sourcePref));
-            if (e != null) {
-                entries.add(e);
-            }
-        }
-        return entries;
+        return src.stream()
+                .map(sourcePref -> deserialize(new HashMap<>(sourcePref)))
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
     }
 
@@ -110,11 +105,8 @@
      */
     public final Set<String> getActiveUrls() {
-        Set<String> urls = new LinkedHashSet<>(); // retain order
-        for (SourceEntry e : get()) {
-            if (e.active) {
-                urls.add(e.url);
-            }
-        }
-        return urls;
+        return get().stream()
+                .filter(e -> e.active)
+                .map(e -> e.url)
+                .collect(Collectors.toCollection(LinkedHashSet::new)); // LinkedHashSet to retain order
     }
 }
