mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
redundant cast: trim too long messages (IDEA-182666)
This commit is contained in:
+1
-1
@@ -22,6 +22,6 @@ class Test {
|
||||
strings.forEach((IoFunction<String>) arg -> {throw new IOException();});
|
||||
strings.forEach((IFunction<String>) arg -> {});
|
||||
strings.forEach((IIFunction<String>) arg -> {});
|
||||
strings.forEach((<warning descr="Casting 'arg -> {}' to 'Consumer<String>' is redundant">Consumer<String></warning>) arg -> {});
|
||||
strings.forEach((<warning descr="Casting 'arg -> {...}' to 'Consumer<String>' is redundant">Consumer<String></warning>) arg -> {});
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -4,6 +4,6 @@ import java.util.stream.Stream;
|
||||
|
||||
class MyTest {
|
||||
private static void getArguments(final Stream<Class<String>> classStream) {
|
||||
final Class<?>[] classes = classStream.toArray(((<warning descr="Casting '(value) -> new Class<?>[value]' to 'IntFunction<Class<?>[]>' is redundant">IntFunction<Class<?>[]></warning>) (value) -> new Class<?>[value]) );
|
||||
final Class<?>[] classes = classStream.toArray(((<warning descr="Casting '(value) -> {...}' to 'IntFunction<Class<?>[]>' is redundant">IntFunction<Class<?>[]></warning>) (value) -> new Class<?>[value]) );
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import java.util.function.Supplier;
|
||||
class Test {
|
||||
{
|
||||
Object o = true ? ((Supplier<String>) () -> "") : null;
|
||||
Supplier<String> s1 = true ? ((<warning descr="Casting '() -> \"\"' to 'Supplier<String>' is redundant">Supplier<String></warning>) () -> "") : null;
|
||||
Supplier<String> s1 = true ? ((<warning descr="Casting '() -> {...}' to 'Supplier<String>' is redundant">Supplier<String></warning>) () -> "") : null;
|
||||
Supplier<String> s2 = true ? ((A) () -> "") : null;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ abstract class LambdaConvert {
|
||||
public abstract <T> T query(Function<Double, T> rse);
|
||||
|
||||
public void with() {
|
||||
addSingle(query((<warning descr="Casting 'resultSet -> \"\"' to 'Function<Double, String>' is redundant">Function<Double, String></warning>)resultSet -> ""));
|
||||
addSingle(query((<warning descr="Casting 'resultSet -> {...}' to 'Function<Double, String>' is redundant">Function<Double, String></warning>)resultSet -> ""));
|
||||
add(query((Function<Double, String>)resultSet -> ""));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user