File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
src/test/java/org/openrewrite/java/migrate/guava Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -257,29 +257,4 @@ class Test {
257257 )
258258 );
259259 }
260-
261- @ Issue ("https://github.com/openrewrite/rewrite-migrate-java/issues/903" )
262- @ Test
263- void doNotConvertPredicatesEqualToWhenUsedInMethodChain () {
264- // Converting Predicates.equalTo() to Predicate.isEqual() breaks type inference when chained with .and()
265- // The issue is that Predicate.isEqual() returns Predicate<? super T> which causes compilation errors
266- // when chained with other methods
267- rewriteRun (
268- //language=java
269- java (
270- """
271- import com.google.common.base.Predicate;
272- import com.google.common.base.Predicates;
273- import java.util.Collection;
274-
275- class A {
276- public static Predicate<Collection<String>> combinedPredicate(Collection<String> aCollection) {
277- Predicate<Collection<String>> anotherPredicate = c -> !c.isEmpty();
278- return Predicates.and(Predicates.equalTo(aCollection), anotherPredicate);
279- }
280- }
281- """
282- )
283- );
284- }
285260}
You can’t perform that action at this time.
0 commit comments