Skip to content

Commit

Permalink
fix cast exception during load
Browse files Browse the repository at this point in the history
  • Loading branch information
bobjacobsen committed May 26, 2020
1 parent 86df4f2 commit 514f20f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/src/jmri/jmrit/display/EditorManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public SortedSet<Editor> getAll() {
@Nonnull
public <T extends Editor> SortedSet<T> getAll(@Nonnull Class<T> type) {
return set.stream()
.filter(e -> e.getClass().isAssignableFrom(type))
.filter(e -> type.isAssignableFrom(e.getClass()))
.map(type::cast)
.collect(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(Editor::getTitle))));
}
Expand Down

0 comments on commit 514f20f

Please sign in to comment.