Make private fields final

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@754470 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-03-14 16:03:31 +00:00
parent 46b743d26e
commit e0d8c67113
4 changed files with 13 additions and 4 deletions

View File

@ -65,7 +65,7 @@ public class NestableDelegate implements Serializable {
* wrapping (which must be a {@link
* org.apache.commons.lang.exception.Nestable} implementation).
*/
private Throwable nestable = null;
private final Throwable nestable;
/**
* Whether to print the stack trace top-down.

View File

@ -40,13 +40,14 @@ public class NestableError extends Error implements Nestable {
* The helper instance which contains much of the code which we
* delegate to.
*/
// TODO make final
protected NestableDelegate delegate = new NestableDelegate(this);
/**
* Holds the reference to the exception or error that caused
* this exception to be thrown.
*/
private Throwable cause = null;
private final Throwable cause;
/**
* Constructs a new <code>NestableError</code> without specified
@ -54,6 +55,7 @@ public class NestableError extends Error implements Nestable {
*/
public NestableError() {
super();
this.cause = null;
}
/**
@ -64,6 +66,7 @@ public NestableError() {
*/
public NestableError(String msg) {
super(msg);
this.cause = null;
}
/**

View File

@ -100,13 +100,14 @@ public class NestableException extends Exception implements Nestable {
* The helper instance which contains much of the code which we
* delegate to.
*/
// TODO make final
protected NestableDelegate delegate = new NestableDelegate(this);
/**
* Holds the reference to the exception or error that caused
* this exception to be thrown.
*/
private Throwable cause = null;
private final Throwable cause;
/**
* Constructs a new <code>NestableException</code> without specified
@ -114,6 +115,7 @@ public class NestableException extends Exception implements Nestable {
*/
public NestableException() {
super();
this.cause = null;
}
/**
@ -124,6 +126,7 @@ public NestableException() {
*/
public NestableException(String msg) {
super(msg);
this.cause = null;
}
/**

View File

@ -44,13 +44,14 @@ public class NestableRuntimeException extends RuntimeException implements Nestab
* The helper instance which contains much of the code which we
* delegate to.
*/
// TODO make final
protected NestableDelegate delegate = new NestableDelegate(this);
/**
* Holds the reference to the exception or error that caused
* this exception to be thrown.
*/
private Throwable cause = null;
private final Throwable cause;
/**
* Constructs a new <code>NestableRuntimeException</code> without specified
@ -58,6 +59,7 @@ public class NestableRuntimeException extends RuntimeException implements Nestab
*/
public NestableRuntimeException() {
super();
this.cause = null;
}
/**
@ -68,6 +70,7 @@ public NestableRuntimeException() {
*/
public NestableRuntimeException(String msg) {
super(msg);
this.cause = null;
}
/**