mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 23:21:09 +07:00
IDEA-187758 Variable initializer is redundant false-negative with chained constructors IDEA-187756 Variable initializer is redundant false-positive when the value is read before write
15 lines
232 B
Java
15 lines
232 B
Java
import java.util.function.Supplier;
|
|
|
|
class Foo {
|
|
String s = "foo";
|
|
|
|
Foo() {
|
|
Supplier<String> fn = s::trim;
|
|
s = "bar";
|
|
System.out.println(fn.get());
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
new Foo();
|
|
}
|
|
} |