mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-23 07:50:55 +07:00
Fixes IDEA-356148 Inlining method creates undesirable temporary variable (cherry picked from commit 34091cb3a6c6388b2086d92e8cd4b206b9250202) IJ-CR-149087 GitOrigin-RevId: 5d38476c8ff706eb180c628d7b481d0f7b00c7ff
22 lines
406 B
Java
22 lines
406 B
Java
import java.util.*;
|
|
|
|
// IDEA-356148
|
|
public class Example {
|
|
|
|
public void example() {
|
|
|
|
final Map<String, Object> map = Map.of();
|
|
if (<caret>test((String)map.get("whatever"))) {
|
|
System.out.println("??");
|
|
}
|
|
|
|
final Object obj = "foo";
|
|
if (test((String)obj)) {
|
|
System.out.println("??");
|
|
}
|
|
}
|
|
|
|
private boolean test(final String str) {
|
|
return Objects.isNull(str);
|
|
}
|
|
} |