Skip to content

Commit

Permalink
Drop now unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Mar 3, 2024
1 parent a726122 commit 261ad17
Show file tree
Hide file tree
Showing 18 changed files with 16 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ public TemplateCodePrinter(Writer writer, List<JCTree.JCVariableDecl> declaredPa
public void visitIdent(JCIdent jcIdent) {
try {
Symbol sym = jcIdent.sym;
Optional<JCTree.JCVariableDecl> param = declaredParameters.stream()
.filter(p -> p.sym == sym)
.findFirst();
Optional<JCTree.JCVariableDecl> param = declaredParameters.stream().filter(p -> p.sym == sym).findFirst();
if (param.isPresent()) {
print("#{" + sym.name);
if (seenParameters.add(param.get())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ public void visitClassDef(JCTree.JCClassDecl classDecl) {
out.write("import org.openrewrite.java.JavaVisitor;\n");
out.write("import org.openrewrite.java.search.*;\n");
out.write("import org.openrewrite.java.template.Primitive;\n");
out.write("import org.openrewrite.java.template.Semantics;\n");
out.write("import org.openrewrite.java.template.function.*;\n");
out.write("import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;\n");
out.write("import org.openrewrite.java.tree.*;\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ void inline() {
"import org.openrewrite.java.JavaVisitor;\n" +
"import org.openrewrite.java.search.*;\n" +
"import org.openrewrite.java.template.Primitive;\n" +
"import org.openrewrite.java.template.Semantics;\n" +
"import org.openrewrite.java.template.function.*;\n" +
"import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;\n" +
"import org.openrewrite.java.tree.*;\n" +
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/ArraysRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;
import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down Expand Up @@ -54,7 +53,7 @@ public String getDisplayName() {

@Override
public String getDescription() {
return "A multiline annotation.\nSupported here too!\nIt also supports escaped quotations: \"I think therefore I am\" - Descartes.\nAnd escaped backslashes: C:\\Users\\JohnDoe\\Documents\\\nAnd escaped tabs: \"This is a string with a tab character\t\".\nAnd escaped carriage returns: \"This is a string with a carriage return character\r\".\nAnd escaped form feeds: \"This is a string with a form feed character\f\".\nAnd escaped backspace characters: \"This is a string with a backspace character\b\".\nAnd escaped null characters: \"This is a string with a null character \".\nAnd escaped octal characters: \"This is a string with an octal characterS\".\nAnd escaped unicode characters: \"This is a string with a unicode characterሴ\".\nAnd raw emoji: \"This is a string with an emoji😀\".\nAnd emojis: \"This is a string with an emoji😀\".";
return "A multiline annotation.\nSupported here too!\nIt also supports escaped quotations: \"I think therefore I am\" - Descartes.\nAnd escaped backslashes: C:\\Users\\JohnDoe\\Documents\\\nAnd escaped tabs: \"This is a string with a tab character\t\".\nAnd escaped carriage returns: \"This is a string with a carriage return character\r\".\nAnd escaped form feeds: \"This is a string with a form feed character\f\".\nAnd escaped backspace characters: \"This is a string with a backspace character\b\".\nAnd escaped null characters: \"This is a string with a null character\u0000\".\nAnd escaped octal characters: \"This is a string with an octal characterS\".\nAnd escaped unicode characters: \"This is a string with a unicode character\u1234\".\nAnd raw emoji: \"This is a string with an emoji\uD83D\uDE00\".\nAnd emojis: \"This is a string with an emoji\uD83D\uDE00\".";
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/EscapesRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/GenericsRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/MatchingRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/MethodThrowsRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/NestedPreconditionsRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/ParameterReuseRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/ShouldAddImportsRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/SimplifyBooleansRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/SimplifyTernaryRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/UnnamedPackageRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/refaster/UseStringIsEmptyRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.search.*;
import org.openrewrite.java.template.Primitive;
import org.openrewrite.java.template.Semantics;

import org.openrewrite.java.template.function.*;
import org.openrewrite.java.template.internal.AbstractRefasterJavaVisitor;
import org.openrewrite.java.tree.*;
Expand Down

0 comments on commit 261ad17

Please sign in to comment.