corrected style issues (mostly empty blocks and missing javadocs)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@201882 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4f7de5d638
commit
b73111983b
|
@ -293,6 +293,7 @@ public abstract class Enum implements Comparable, Serializable {
|
|||
* <p>Restrictive constructor.</p>
|
||||
*/
|
||||
private Entry() {
|
||||
; // empty constructor
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ public class EnumUtils {
|
|||
* @since 2.0
|
||||
*/
|
||||
public EnumUtils() {
|
||||
; // empty constructor
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -290,6 +290,7 @@ public abstract class Enum implements Comparable, Serializable {
|
|||
* <p>Restrictive constructor.</p>
|
||||
*/
|
||||
private Entry() {
|
||||
; // empty constructor
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ public class EnumUtils {
|
|||
* @since 2.0
|
||||
*/
|
||||
public EnumUtils() {
|
||||
; // empty constructor
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -91,6 +91,7 @@ public class ExceptionUtils {
|
|||
* to be created, although that is not normally necessary.</p>
|
||||
*/
|
||||
public ExceptionUtils() {
|
||||
; // empty constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -293,15 +294,20 @@ public class ExceptionUtils {
|
|||
try {
|
||||
method = throwable.getClass().getMethod(methodName, null);
|
||||
} catch (NoSuchMethodException ignored) {
|
||||
; // exception ignored
|
||||
} catch (SecurityException ignored) {
|
||||
; // exception ignored
|
||||
}
|
||||
|
||||
if (method != null && Throwable.class.isAssignableFrom(method.getReturnType())) {
|
||||
try {
|
||||
return (Throwable) method.invoke(throwable, ArrayUtils.EMPTY_OBJECT_ARRAY);
|
||||
} catch (IllegalAccessException ignored) {
|
||||
; // exception ignored
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
; // exception ignored
|
||||
} catch (InvocationTargetException ignored) {
|
||||
; // exception ignored
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -319,14 +325,18 @@ public class ExceptionUtils {
|
|||
try {
|
||||
field = throwable.getClass().getField(fieldName);
|
||||
} catch (NoSuchFieldException ignored) {
|
||||
; // exception ignored
|
||||
} catch (SecurityException ignored) {
|
||||
; // exception ignored
|
||||
}
|
||||
|
||||
if (field != null && Throwable.class.isAssignableFrom(field.getType())) {
|
||||
try {
|
||||
return (Throwable) field.get(throwable);
|
||||
} catch (IllegalAccessException ignored) {
|
||||
; // exception ignored
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
; // exception ignored
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -377,7 +387,9 @@ public class ExceptionUtils {
|
|||
return true;
|
||||
}
|
||||
} catch (NoSuchMethodException ignored) {
|
||||
; // exception ignored
|
||||
} catch (SecurityException ignored) {
|
||||
; // exception ignored
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -387,7 +399,9 @@ public class ExceptionUtils {
|
|||
return true;
|
||||
}
|
||||
} catch (NoSuchFieldException ignored) {
|
||||
; // exception ignored
|
||||
} catch (SecurityException ignored) {
|
||||
; // exception ignored
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -522,6 +536,17 @@ public class ExceptionUtils {
|
|||
return indexOf(throwable, type, fromIndex, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Worker method for the <code>indexOfType</code> methods.</p>
|
||||
*
|
||||
* @param throwable the throwable to inspect, may be null
|
||||
* @param type the type to search for, subclasses match, null returns -1
|
||||
* @param fromIndex the (zero based) index of the starting position,
|
||||
* negative treated as zero, larger than chain size returns -1
|
||||
* @param subclass if <code>true</code>, compares with {@link Class.isAssignableFrom(Class)}, otherwise compares
|
||||
* using references
|
||||
* @return index of the <code>type</code> within throwables nested withing the specified <code>throwable</code>
|
||||
*/
|
||||
private static int indexOf(Throwable throwable, Class type, int fromIndex, boolean subclass) {
|
||||
if (throwable == null || type == null) {
|
||||
return -1;
|
||||
|
|
|
@ -83,6 +83,9 @@ public class NestableError extends Error implements Nestable {
|
|||
this.cause = cause;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Throwable getCause() {
|
||||
return cause;
|
||||
}
|
||||
|
@ -104,6 +107,9 @@ public class NestableError extends Error implements Nestable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public String getMessage(int index) {
|
||||
if (index == 0) {
|
||||
return super.getMessage();
|
||||
|
@ -112,42 +118,72 @@ public class NestableError extends Error implements Nestable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public String[] getMessages() {
|
||||
return delegate.getMessages();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Throwable getThrowable(int index) {
|
||||
return delegate.getThrowable(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int getThrowableCount() {
|
||||
return delegate.getThrowableCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Throwable[] getThrowables() {
|
||||
return delegate.getThrowables();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int indexOfThrowable(Class type) {
|
||||
return delegate.indexOfThrowable(type, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int indexOfThrowable(Class type, int fromIndex) {
|
||||
return delegate.indexOfThrowable(type, fromIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printStackTrace() {
|
||||
delegate.printStackTrace();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printStackTrace(PrintStream out) {
|
||||
delegate.printStackTrace(out);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printStackTrace(PrintWriter out) {
|
||||
delegate.printStackTrace(out);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public final void printPartialStackTrace(PrintWriter out) {
|
||||
super.printStackTrace(out);
|
||||
}
|
||||
|
|
|
@ -143,6 +143,9 @@ public class NestableException extends Exception implements Nestable {
|
|||
this.cause = cause;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Throwable getCause() {
|
||||
return cause;
|
||||
}
|
||||
|
@ -164,6 +167,9 @@ public class NestableException extends Exception implements Nestable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public String getMessage(int index) {
|
||||
if (index == 0) {
|
||||
return super.getMessage();
|
||||
|
@ -172,42 +178,72 @@ public class NestableException extends Exception implements Nestable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public String[] getMessages() {
|
||||
return delegate.getMessages();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Throwable getThrowable(int index) {
|
||||
return delegate.getThrowable(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int getThrowableCount() {
|
||||
return delegate.getThrowableCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Throwable[] getThrowables() {
|
||||
return delegate.getThrowables();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int indexOfThrowable(Class type) {
|
||||
return delegate.indexOfThrowable(type, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int indexOfThrowable(Class type, int fromIndex) {
|
||||
return delegate.indexOfThrowable(type, fromIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printStackTrace() {
|
||||
delegate.printStackTrace();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printStackTrace(PrintStream out) {
|
||||
delegate.printStackTrace(out);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printStackTrace(PrintWriter out) {
|
||||
delegate.printStackTrace(out);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public final void printPartialStackTrace(PrintWriter out) {
|
||||
super.printStackTrace(out);
|
||||
}
|
||||
|
|
|
@ -87,6 +87,9 @@ public class NestableRuntimeException extends RuntimeException implements Nestab
|
|||
this.cause = cause;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Throwable getCause() {
|
||||
return cause;
|
||||
}
|
||||
|
@ -108,6 +111,9 @@ public class NestableRuntimeException extends RuntimeException implements Nestab
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public String getMessage(int index) {
|
||||
if (index == 0) {
|
||||
return super.getMessage();
|
||||
|
@ -116,42 +122,72 @@ public class NestableRuntimeException extends RuntimeException implements Nestab
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public String[] getMessages() {
|
||||
return delegate.getMessages();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Throwable getThrowable(int index) {
|
||||
return delegate.getThrowable(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int getThrowableCount() {
|
||||
return delegate.getThrowableCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Throwable[] getThrowables() {
|
||||
return delegate.getThrowables();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int indexOfThrowable(Class type) {
|
||||
return delegate.indexOfThrowable(type, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public int indexOfThrowable(Class type, int fromIndex) {
|
||||
return delegate.indexOfThrowable(type, fromIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printStackTrace() {
|
||||
delegate.printStackTrace();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printStackTrace(PrintStream out) {
|
||||
delegate.printStackTrace(out);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printStackTrace(PrintWriter out) {
|
||||
delegate.printStackTrace(out);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public final void printPartialStackTrace(PrintWriter out) {
|
||||
super.printStackTrace(out);
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ public class NumberUtils {
|
|||
* to operate.</p>
|
||||
*/
|
||||
public NumberUtils() {
|
||||
; // empty constructor
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -472,6 +473,7 @@ public class NumberUtils {
|
|||
}
|
||||
|
||||
} catch (NumberFormatException nfe) {
|
||||
; // empty catch
|
||||
}
|
||||
//Fall through
|
||||
case 'd' :
|
||||
|
@ -482,10 +484,12 @@ public class NumberUtils {
|
|||
return d;
|
||||
}
|
||||
} catch (NumberFormatException nfe) {
|
||||
; // empty constructor
|
||||
}
|
||||
try {
|
||||
return createBigDecimal(numeric);
|
||||
} catch (NumberFormatException e) {
|
||||
; // empty constructor
|
||||
}
|
||||
//Fall through
|
||||
default :
|
||||
|
@ -505,10 +509,12 @@ public class NumberUtils {
|
|||
try {
|
||||
return createInteger(str);
|
||||
} catch (NumberFormatException nfe) {
|
||||
; // empty contructor
|
||||
}
|
||||
try {
|
||||
return createLong(str);
|
||||
} catch (NumberFormatException nfe) {
|
||||
; // empty constructor
|
||||
}
|
||||
return createBigInteger(str);
|
||||
|
||||
|
@ -521,6 +527,7 @@ public class NumberUtils {
|
|||
return f;
|
||||
}
|
||||
} catch (NumberFormatException nfe) {
|
||||
; // empty constructor
|
||||
}
|
||||
try {
|
||||
Double d = createDouble(str);
|
||||
|
@ -528,6 +535,7 @@ public class NumberUtils {
|
|||
return d;
|
||||
}
|
||||
} catch (NumberFormatException nfe) {
|
||||
; // empty constructor
|
||||
}
|
||||
|
||||
return createBigDecimal(str);
|
||||
|
|
Loading…
Reference in New Issue