Author: sebb Date: Wed Mar 16 00:34:22 2011 New Revision: 1082013 URL: http://svn.apache.org/viewvc?rev=1082013&view=rev Log: NET-374 ParserInitializationException doesn't use standard JDK exception chaining
Modified: commons/proper/net/trunk/src/changes/changes.xml commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/ParserInitializationException.java Modified: commons/proper/net/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1082013&r1=1082012&r2=1082013&view=diff ============================================================================== --- commons/proper/net/trunk/src/changes/changes.xml (original) +++ commons/proper/net/trunk/src/changes/changes.xml Wed Mar 16 00:34:22 2011 @@ -57,6 +57,9 @@ The <action> type attribute can be add,u <body> <release version="3.0" date="TBA" description="TBA"> + <action issue="NET-374" dev="sebb" type="update"> + ParserInitializationException doesn't use standard JDK exception chaining + </action> <action issue="NET-372" dev="sebb" type="add"> FTPSClient: java.security.cert.CertificateException: No X509TrustManager implementation available if trustManager == null </action> Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/ParserInitializationException.java URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/ParserInitializationException.java?rev=1082013&r1=1082012&r2=1082013&view=diff ============================================================================== --- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/ParserInitializationException.java (original) +++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/ParserInitializationException.java Wed Mar 16 00:34:22 2011 @@ -24,12 +24,7 @@ package org.apache.commons.net.ftp.parse */ public class ParserInitializationException extends RuntimeException { - private static final long serialVersionUID = 1123380491796734328L; - - /** - * Root exception that caused this to be thrown - */ - private final Throwable rootCause; + private static final long serialVersionUID = 5563335279583210658L; /** * Constucts a ParserInitializationException with just a message @@ -38,7 +33,6 @@ public class ParserInitializationExcepti */ public ParserInitializationException(String message) { super(message); - this.rootCause = null; } /** @@ -50,8 +44,7 @@ public class ParserInitializationExcepti * this to be thrown */ public ParserInitializationException(String message, Throwable rootCause) { - super(message); - this.rootCause = rootCause; + super(message, rootCause); } /** @@ -59,9 +52,11 @@ public class ParserInitializationExcepti * if no root cause was specified. * * @return the root cause of this exception being thrown + * @deprecated use {@link #getCause()} instead */ + @Deprecated public Throwable getRootCause() { - return this.rootCause; + return super.getCause(); } }