mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
redundant cast: recapture wildcards for non-physical elements (IDEA-153166)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
|
||||
import java.util.function.IntFunction;
|
||||
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]) );
|
||||
}
|
||||
}
|
||||
+4
@@ -61,6 +61,10 @@ public class LambdaRedundantCastTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testCapturedWildcardInCast() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(BASE_PATH + "/" + getTestName(false) + ".java", true, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user