You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2020/11/18 08:21:06 UTC
[commons-daemon] branch master updated: Simplify we there is no
longer a need to support Java 1.3 and earlier
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push:
new 0332df4 Simplify we there is no longer a need to support Java 1.3 and earlier
0332df4 is described below
commit 0332df4ccaaa4cc4271d0cb91ba38ed30ac9171e
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Nov 18 08:14:35 2020 +0000
Simplify we there is no longer a need to support Java 1.3 and earlier
---
src/main/java/org/apache/commons/daemon/DaemonInitException.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/apache/commons/daemon/DaemonInitException.java b/src/main/java/org/apache/commons/daemon/DaemonInitException.java
index 872a7da..aa9114f 100644
--- a/src/main/java/org/apache/commons/daemon/DaemonInitException.java
+++ b/src/main/java/org/apache/commons/daemon/DaemonInitException.java
@@ -24,9 +24,6 @@ public class DaemonInitException extends Exception {
private static final long serialVersionUID = 5665891535067213551L;
- // don't rely on Throwable#getCause (jdk1.4)
- private final Throwable cause;
-
/**
* Constructs a new exception with the specified message.
*
@@ -34,16 +31,14 @@ public class DaemonInitException extends Exception {
*/
public DaemonInitException(final String message) {
super(message);
- this.cause = null;
}
public DaemonInitException(final String message, final Throwable cause) {
- super(message);
- this.cause = cause;
+ super(message, cause);
}
public String getMessageWithCause() {
- final String extra = this.cause == null ? "" : ": " + this.cause.getMessage();
+ final String extra = getCause() == null ? "" : ": " + getCause().getMessage();
return getMessage() + extra;
}