/** * Convert to corresponding JDK exception. Warning, since there are synchronized method execution * please beware of the performance issue when calling this method * @return The JDK {@link UnsupportedOperationException} convert from this exception instance */ public UnsupportedOperationException asJDKException() { UnsupportedOperationException e = new UnsupportedOperationException(getMessage()) { @Override public synchronized Throwable fillInStackTrace() { return this; } }; e.setStackTrace(getStackTrace()); return e; }
/** * Convert to corresponding JDK exception. Warning, since there are synchronized method execution * please beware of the performance issue when calling this method * @return The JDK {@link UnsupportedOperationException} convert from this exception instance */ public UnsupportedOperationException asJDKException() { UnsupportedOperationException e = new UnsupportedOperationException(getMessage()) { @Override public synchronized Throwable fillInStackTrace() { return this; } }; e.setStackTrace(getStackTrace()); return e; }