introduce functional: combine extract method & introduce

IDEA-174011; IDEA-174021
This commit is contained in:
Anna Kozlova
2017-06-07 19:04:04 +03:00
parent cb1e34fe92
commit d65ff6ad81
8 changed files with 77 additions and 111 deletions
@@ -1,14 +1,14 @@
import java.util.function.Supplier;
class Test {
void foo() {
void foo() {
if (true) {
Supplier<String> stringSupplier = new Supplier<String>() {
Supplier<String> supplier = new Supplier<String>() {
public String get() {
return "Hello, world";
}
};
System.out.println(stringSupplier.get());
System.out.println(supplier.get());
}
}
}