Changeset 16451 in josm for trunk


Ignore:
Timestamp:
2020-05-17T18:05:00+02:00 (5 years ago)
Author:
simon04
Message:

see #19251 - Java warning, FindBugs

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java

    r16449 r16451  
    9191    @Deprecated
    9292    public static <T extends PrimitiveData> List<T> getFilteredList(Collection<T> list, OsmPrimitiveType type) {
    93         return list.stream().filter(p -> type.getDataClass().isInstance(p)).map(p -> (T) p).collect(Collectors.toList());
     93        return list.stream().filter(p -> type.getDataClass().isInstance(p)).collect(Collectors.toList());
    9494    }
    9595
  • trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java

    r16445 r16451  
    765765                mv = osm.get(key);
    766766                if (!caseSensitive && mv == null) {
    767                     mv = osm.keySet().stream().filter(key::equalsIgnoreCase).map(osm::get).findFirst().orElse(mv);
     767                    mv = osm.keySet().stream().filter(key::equalsIgnoreCase).map(osm::get).findFirst().orElse(null);
    768768                }
    769769            }
Note: See TracChangeset for help on using the changeset viewer.