Skip to content

Commit 61c1777

Browse files
1 parent 95028a5 commit 61c1777

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/main/resources/META-INF/rewrite/examples.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9556,6 +9556,25 @@ examples:
95569556
language: java
95579557
---
95589558
type: specs.openrewrite.org/v1beta/example
9559+
recipeName: org.openrewrite.java.migrate.util.UsePredicateNot
9560+
examples:
9561+
- description: '`UsePredicateNotTest#castOfMethodReference`'
9562+
sources:
9563+
- before: |
9564+
import java.util.function.Predicate;
9565+
9566+
class A {
9567+
Predicate<String> notEmpty = ((Predicate<String>) String::isEmpty).negate();
9568+
}
9569+
after: |
9570+
import java.util.function.Predicate;
9571+
9572+
class A {
9573+
Predicate<String> notEmpty = Predicate.not(String::isEmpty);
9574+
}
9575+
language: java
9576+
---
9577+
type: specs.openrewrite.org/v1beta/example
95599578
recipeName: org.openrewrite.java.migrate.util.UseSetOf
95609579
examples:
95619580
- description: '`UseSetOfTest#anonymousHashSetWithAdd`'

0 commit comments

Comments
 (0)