Skip to content

Commit 277e1ff

Browse files
author
taylor.smock
committed
See #23785: Log when an imagery layer is removed due to validity reasons
git-svn-id: https://josm.openstreetmap.de/svn/trunk@19131 0c6e7542-c601-0410-84e7-c038aed88b3b
1 parent 72adbb7 commit 277e1ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// License: GPL. For details, see LICENSE file.
22
package org.openstreetmap.josm.data.imagery;
33

4+
import static java.util.function.Predicate.not;
45
import static org.openstreetmap.josm.tools.I18n.tr;
56

67
import java.io.IOException;
@@ -167,7 +168,8 @@ protected void loadSource(String source) {
167168
reader.setFastFail(fastFail);
168169
Collection<ImageryInfo> result = reader.parse();
169170
// See #23485 (remove invalid source entries)
170-
result.removeIf(info -> !info.isValid());
171+
result.stream().filter(not(ImageryInfo::isValid)).forEach(info -> Logging.error("Not adding invalid imagery: {0}", info));
172+
result.removeIf(not(ImageryInfo::isValid));
171173
newLayers.addAll(result);
172174
} catch (IOException ex) {
173175
loadError = true;

0 commit comments

Comments
 (0)