From 1e4a8d9468eb0e1a28b3164c192674562123c7a5 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Mon, 30 Sep 2024 12:34:55 +0200 Subject: [PATCH] Also use DocCommentTree in ReloadableJava17ParserVisitor --- .../java/isolated/ReloadableJava17ParserVisitor.java | 4 ++-- .../openrewrite/maven/RemoveDuplicateDependenciesTest.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17ParserVisitor.java b/rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17ParserVisitor.java index f13b73efcfb..65e8cbb7310 100644 --- a/rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17ParserVisitor.java +++ b/rewrite-java-17/src/main/java/org/openrewrite/java/isolated/ReloadableJava17ParserVisitor.java @@ -16,11 +16,11 @@ package org.openrewrite.java.isolated; +import com.sun.source.doctree.DocCommentTree; import com.sun.source.tree.*; import com.sun.source.util.TreePathScanner; import com.sun.tools.javac.code.Flags; import com.sun.tools.javac.code.Symbol; -import com.sun.tools.javac.tree.DCTree; import com.sun.tools.javac.tree.DocCommentTable; import com.sun.tools.javac.tree.EndPosTable; import com.sun.tools.javac.tree.JCTree; @@ -2139,7 +2139,7 @@ private List collectAnnotations(Map annotat return annotations; } - Space formatWithCommentTree(String prefix, JCTree tree, DCTree.@Nullable DCDocComment commentTree) { + Space formatWithCommentTree(String prefix, JCTree tree, @Nullable DocCommentTree commentTree) { Space fmt = format(prefix); if (commentTree != null) { List comments = fmt.getComments(); diff --git a/rewrite-maven/src/test/java/org/openrewrite/maven/RemoveDuplicateDependenciesTest.java b/rewrite-maven/src/test/java/org/openrewrite/maven/RemoveDuplicateDependenciesTest.java index ebacf75c684..6d45ffcc694 100644 --- a/rewrite-maven/src/test/java/org/openrewrite/maven/RemoveDuplicateDependenciesTest.java +++ b/rewrite-maven/src/test/java/org/openrewrite/maven/RemoveDuplicateDependenciesTest.java @@ -15,7 +15,6 @@ */ package org.openrewrite.maven; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.openrewrite.DocumentExample; import org.openrewrite.Issue;