Skip to content

Commit

Permalink
refactor: Use method references in lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek and TeamModerne committed Aug 7, 2023
1 parent 147b866 commit 984a12d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private static boolean isSnakeYamlUsedUnsafeOrEscapesScope(Cursor scope) {
methodDeclaration
.getParameters()
.stream()
.filter(p -> p instanceof J.VariableDeclarations)
.filter(org.openrewrite.java.tree.J.VariableDeclarations.class::isInstance)
.flatMap(p -> ((J.VariableDeclarations) p).getVariables().stream())
.forEach(v -> methodArguments.add(v.getSimpleName()));
}
Expand Down

0 comments on commit 984a12d

Please sign in to comment.