Skip to content

Commit

Permalink
JavaxAnnotationsToSpotbugs should not order imports
Browse files Browse the repository at this point in the history
Creates too many unrelated changes. Fixes #10.
  • Loading branch information
sghill committed Jul 25, 2023
1 parent 5e1aa07 commit 341b116
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/main/resources/META-INF/rewrite/jsr-305.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ recipeList:
oldPackageName: javax.annotation
newPackageName: edu.umd.cs.findbugs.annotations
recursive: false
- org.openrewrite.java.OrderImports:
removeUnused: false
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public String key() {

@Test
@DocumentExample
void shouldOrderImports() {
void shouldNotOrderImports() {
rewriteRun(java(
"""
import javax.annotation.CheckForNull;
Expand All @@ -97,9 +97,9 @@ public String key() {
}
""".stripIndent(),
"""
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import java.util.Objects;
public class A {
Expand Down

0 comments on commit 341b116

Please sign in to comment.