Is it safe to store an instance of an Exception and reuse it?
问题 Is it safe to: public class Widget { private static final IllegalStateException LE_EXCEPTION = new IllegalStateException("le sophisticated way"); ... public void fun() { // some logic here, that may throw throw LE_EXCEPTION; } .... } keep an instance of an exception use it whenever needed (throw) instead of throwing a new exception each time? I am interested if it's safe By safe I mean: no memory corruption, no additional exceptions thrown by JVM, by missing classes, no bad classes loaded (..