mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-05 19:52:07 +07:00
Fixes IDEA-352207 Incorrect unreachable code warning due to exception handling from implicit toString GitOrigin-RevId: a79c89eaa5ec6a06fea72985c21244980d0fbcbb
14 lines
338 B
Java
14 lines
338 B
Java
import org.jetbrains.annotations.*;
|
|
|
|
class Test {
|
|
@NotNull
|
|
private static String getKeyText(@NotNull Object key) {
|
|
String res = key.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(key));
|
|
try {
|
|
return res + "(" + key + ")";
|
|
}
|
|
catch (RuntimeException ignored) {
|
|
}
|
|
return res;
|
|
}
|
|
} |