Files
Tagir Valeevandintellij-monorepo-bot 2ab30a5915 [java-dfa] Handle exceptions from implicit toString in string concatenation
Fixes IDEA-352207 Incorrect unreachable code warning due to exception handling from implicit toString

GitOrigin-RevId: a79c89eaa5ec6a06fea72985c21244980d0fbcbb
2024-04-22 11:00:51 +00:00

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;
}
}