mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-21 04:50:58 +07:00
14 lines
348 B
Java
14 lines
348 B
Java
// "Fix all ''Optional' can be replaced with sequence of 'if' statements' problems in file" "true"
|
|
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
|
|
void statementWithIfPresentWithMultipleInstuctionsGeneratesCodeBlock(String s) {
|
|
Optional.<caret>ofNullable(s)
|
|
.ifPresent(s1 -> {
|
|
s1 = s1.trim();
|
|
System.out.println(s1);
|
|
});
|
|
}
|
|
} |