mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 03:37:58 +07:00
[java-highlighting] Remove unhelpful fixes when type inference fails
GitOrigin-RevId: a4da4b47eabbcf5438ff9d1de82240d4880b8c50
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b2dfb4c8a8
commit
35c501455e
@@ -0,0 +1,13 @@
|
||||
// "Cast expression to 'java.lang.String'" "false"
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
class X {
|
||||
public static String getOrDefault(String prefer, Supplier<String> def) {
|
||||
return getOrDefault(() -> prefer, String::isEmpty, def<caret>.get());
|
||||
}
|
||||
|
||||
public static <T> T getOrDefault(Supplier<T> prefer, Predicate<T> abandon, Supplier<T> def) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Wrap using 'String.valueOf()'" "false"
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
class X {
|
||||
public static String getOrDefault(String prefer, Supplier<String> def) {
|
||||
return getOrDefault(() -> prefer, String::isEmpty, def<caret>.get());
|
||||
}
|
||||
|
||||
public static <T> T getOrDefault(Supplier<T> prefer, Predicate<T> abandon, Supplier<T> def) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user