mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-05 21:00:59 +07:00
[java-inspections] ReplaceWithConstantValueFix: substitute parameter types when necessary
Fixes IDEA-276811 Replace-with-null refactoring is incorrect when generics are involved GitOrigin-RevId: 5783d19c4c5458ecb3c1e97ed11ff1d78a756793
This commit is contained in:
committed by
intellij-monorepo-bot
parent
83e613fa2f
commit
5f0fd1d8e1
@@ -0,0 +1,9 @@
|
||||
// "Replace with 'null'" "true"
|
||||
import java.util.stream.*;
|
||||
|
||||
class Test {
|
||||
public static void method() {
|
||||
Object obj = null;
|
||||
Stream<Object> stream = Stream.of((Object) null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace with 'null'" "true"
|
||||
import java.util.stream.*;
|
||||
|
||||
class Test {
|
||||
public static void method() {
|
||||
Object obj = null;
|
||||
Stream<Object> stream = Stream.of(<caret>obj);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user