Deprecate LogConfigurationException.cause in favor of getCause()
This commit is contained in:
@@ -79,6 +79,9 @@ The <action> type attribute can be add,update,fix,remove.
|
|||||||
<action type="fix" issue="LOGGING-185" dev="ggregory" due-to="Piotr P. Karwasz">
|
<action type="fix" issue="LOGGING-185" dev="ggregory" due-to="Piotr P. Karwasz">
|
||||||
Fix failing tests #180.
|
Fix failing tests #180.
|
||||||
</action>
|
</action>
|
||||||
|
<action type="fix" dev="ggregory" due-to="Gary Gregory">
|
||||||
|
Deprecate LogConfigurationException.cause in favor of getCause().
|
||||||
|
</action>
|
||||||
<!-- UPDATE -->
|
<!-- UPDATE -->
|
||||||
<action dev="ggregory" type="update" due-to="Gary Gregory">
|
<action dev="ggregory" type="update" due-to="Gary Gregory">
|
||||||
Bump Java from 6 to 8.
|
Bump Java from 6 to 8.
|
||||||
|
|||||||
@@ -18,9 +18,7 @@
|
|||||||
package org.apache.commons.logging;
|
package org.apache.commons.logging;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An exception that is thrown only if a suitable {@code LogFactory}
|
* An exception that is thrown only if a suitable {@code LogFactory} or {@code Log} instance cannot be created by the corresponding factory methods.
|
||||||
* or {@code Log} instance cannot be created by the corresponding
|
|
||||||
* factory methods.
|
|
||||||
*/
|
*/
|
||||||
public class LogConfigurationException extends RuntimeException {
|
public class LogConfigurationException extends RuntimeException {
|
||||||
|
|
||||||
@@ -29,7 +27,10 @@ public class LogConfigurationException extends RuntimeException {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The underlying cause of this exception.
|
* The underlying cause of this exception.
|
||||||
|
*
|
||||||
|
* @deprecated Use {@link #getCause()}.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
protected Throwable cause;
|
protected Throwable cause;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,13 +55,12 @@ public class LogConfigurationException extends RuntimeException {
|
|||||||
* @param cause The underlying cause
|
* @param cause The underlying cause
|
||||||
*/
|
*/
|
||||||
public LogConfigurationException(final String message, final Throwable cause) {
|
public LogConfigurationException(final String message, final Throwable cause) {
|
||||||
super(message + " (Caused by " + cause + ")");
|
super(message, cause);
|
||||||
this.cause = cause; // Two-argument version requires JDK 1.4 or later
|
this.cause = cause;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new exception with the specified cause and a derived
|
* Constructs a new exception with the specified cause and a derived detail message.
|
||||||
* detail message.
|
|
||||||
*
|
*
|
||||||
* @param cause The underlying cause
|
* @param cause The underlying cause
|
||||||
*/
|
*/
|
||||||
@@ -68,11 +68,4 @@ public class LogConfigurationException extends RuntimeException {
|
|||||||
this(cause == null ? null : cause.toString(), cause);
|
this(cause == null ? null : cause.toString(), cause);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the underlying cause of this exception (if any).
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Throwable getCause() {
|
|
||||||
return this.cause;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user