From babb4b23f8a15c2b49506a93cb7c9fd6f7edf4dd Mon Sep 17 00:00:00 2001
From: Taylor Smock <tsmock@fb.com>
Date: Mon, 28 Jun 2021 08:34:34 -0600
Subject: [PATCH] Fix #21043: ClassCastException when filtering non-osm
primitives
Signed-off-by: Taylor Smock <tsmock@fb.com>
---
src/org/openstreetmap/josm/data/osm/FilterMatcher.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/org/openstreetmap/josm/data/osm/FilterMatcher.java b/src/org/openstreetmap/josm/data/osm/FilterMatcher.java
index 5cdb25a90..4a7e2b37a 100644
|
a
|
b
|
public class FilterMatcher {
|
| 209 | 209 | |
| 210 | 210 | private static boolean allParentMultipolygonsFiltered(IPrimitive primitive, boolean hidden) { |
| 211 | 211 | boolean isExplicit = false; |
| 212 | | for (Relation r : new SubclassFilteredCollection<IPrimitive, Relation>( |
| 213 | | primitive.getReferrers(), IPrimitive::isMultipolygon)) { |
| | 212 | for (IRelation<?> r : new SubclassFilteredCollection<IPrimitive, IRelation<?>>( |
| | 213 | primitive.getReferrers(), i -> i.isMultipolygon() && i instanceof IFilterablePrimitive)) { |
| 214 | 214 | if (!isFiltered(r, hidden)) |
| 215 | 215 | return false; |
| 216 | | isExplicit |= isFilterExplicit(r, hidden); |
| | 216 | isExplicit |= isFilterExplicit((IFilterablePrimitive) r, hidden); |
| 217 | 217 | } |
| 218 | 218 | return isExplicit; |
| 219 | 219 | } |