@Override public final IndexOutOfBoundsException invalidIndex(final int index) { final IndexOutOfBoundsException result = new IndexOutOfBoundsException(String.format(getLoggingLocale(), invalidIndex$str(), index)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String invalidSocketAddressTypeForUri = "ELY04022: Invalid socket address type for URI";
@Override public final IndexOutOfBoundsException invalidIndex(final int index) { final IndexOutOfBoundsException result = new IndexOutOfBoundsException(String.format(getLoggingLocale(), invalidIndex$str(), index)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String invalidSocketAddressTypeForUri = "ELY04022: Invalid socket address type for URI";
@Override public final IndexOutOfBoundsException invalidIndex(final int index) { final IndexOutOfBoundsException result = new IndexOutOfBoundsException(String.format(getLoggingLocale(), invalidIndex$str(), index)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String invalidSocketAddressTypeForUri = "ELY04022: Invalid socket address type for URI";
/** * 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 IndexOutOfBoundsException} converted from this excpetion instance */ public IndexOutOfBoundsException asJDKException() { IndexOutOfBoundsException e = new IndexOutOfBoundsException(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 IndexOutOfBoundsException} converted from this excpetion instance */ public IndexOutOfBoundsException asJDKException() { IndexOutOfBoundsException e = new IndexOutOfBoundsException(getMessage()) { @Override public synchronized Throwable fillInStackTrace() { return this; } }; e.setStackTrace(getStackTrace()); return e; } }