diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a30ad4..4814bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ value. This means that the value will still be rendered in its proper syntax coloring rather than in the "folded" coloring. (Closes: #159) +### Changed + +- Internal/Chore: Replace some compat code now that we no longer support IDEA 2020.1. + ## 0.0.23 - 2024-04-06 ### Added diff --git a/src/main/java/com/github/nthykier/debpkg/deb822/Deb822FoldingBuilder.java b/src/main/java/com/github/nthykier/debpkg/deb822/Deb822FoldingBuilder.java index 2f5ad17..fde889c 100644 --- a/src/main/java/com/github/nthykier/debpkg/deb822/Deb822FoldingBuilder.java +++ b/src/main/java/com/github/nthykier/debpkg/deb822/Deb822FoldingBuilder.java @@ -158,11 +158,8 @@ public boolean isCollapsedByDefault(@NotNull ASTNode node) { private static void processComments(PsiElement root, List descriptors) { List comments = new ArrayList<>(); - // Use (root, PsiComment.class, ...) when 201 compat can be dropped. - PsiTreeUtil.processElements(root, e -> { - if (e instanceof PsiComment) { - comments.add((PsiComment)e); - } + PsiTreeUtil.processElements(root, PsiComment.class, e -> { + comments.add(e); return true; }); PsiComment currentStart = null;