Since implementation of Throwable is already required, this doesn't
change the interface, but does simplify the internals.
o Simplified code in getThrowableCount() method by removing extraneous
null check and extra reference.
o Implemented suggestion by Joachim.Sauer@tp-soft.com to use
ExceptionUtils where Nestable.getCause() was previously called.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@136972 13f79535-47bb-0310-9956-ffa450edef68
method names which may yield a wrapped exception.
getCause(Throwable): Now just wraps getCause(Throwable, String[]),
passing in CAUSE_METHOD_NAMES as its list of method names.
getCause(Throwable, String[]): Refactored code extracted from
getCause(Throwable) which looks at a list of method names, plus a
"detail" field.
getCauseUsingMethodName(): Swapped parameter order for consistency.
getCauseUsingFieldName(): New method which introspects fields instead
of methods.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@136967 13f79535-47bb-0310-9956-ffa450edef68
internally. This will allow more cause method names to be added with
ease.
getCauseUsingWellKnownTypes(Throwable): Extracted from getCause().
getCauseUsingMethodName(String, Throwable): Extracted from getCause().
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@136966 13f79535-47bb-0310-9956-ffa450edef68
deprecated method getLength(), replaced with getThrowableCount();
deprecated indexOfThrowable(int, Class), replaced with indexOfThrowable(Class, int) to make signature consistent with other APIs;
changed functionality of methods that receive an index argument to throw an IndexOutOfBoundsException if the index is specified incorrectly, rather than absorbing invalid indices silently, to bring in line with the String API
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@136951 13f79535-47bb-0310-9956-ffa450edef68
deprecated indexOfThrowable(int, Class), replaced with indexOfThrowable(Class, int) to make signature consistent with other APIs;
changed functionality of methods that receive an index argument to throw an IndexOutOfBoundsException if the index is specified incorrectly, rather than absorbing invalid indices silently, to bring in line with the String API
cleaned up javadoc;
rearranged methods alphabetically
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@136950 13f79535-47bb-0310-9956-ffa450edef68
this is not good practice. However, since 1.0 final has not yet been
released, it is out-weighed by the trade off of releasing code that just
plain doesn't work.
Use str.getBytes(encoding) in place of convertUnicodeToNative().
Use new String(byte[], encoding) in place of convertNativeToUnicode().
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@136945 13f79535-47bb-0310-9956-ffa450edef68