commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1129360 - /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/plugins/PluginInvalidInputException.java
Date Mon, 30 May 2011 20:47:04 GMT
Author: simonetripodi
Date: Mon May 30 20:47:04 2011
New Revision: 1129360

URL: http://svn.apache.org/viewvc?rev=1129360&view=rev
Log:
no needs to store the cause, reused Exception default behavior
added missing descriptions on javadoc

Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/plugins/PluginInvalidInputException.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/plugins/PluginInvalidInputException.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/plugins/PluginInvalidInputException.java?rev=1129360&r1=1129359&r2=1129360&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/plugins/PluginInvalidInputException.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/plugins/PluginInvalidInputException.java
Mon May 30 20:47:04 2011
@@ -30,18 +30,19 @@ public class PluginInvalidInputException
 
     private static final long serialVersionUID = 1L;
 
-    private Throwable cause = null;
-
     /**
+     * Constructs a new exception with the specified cause.
+     *
      * @param cause underlying exception that caused this to be thrown
      */
     public PluginInvalidInputException( Throwable cause )
     {
-        this( cause.getMessage() );
-        this.cause = cause;
+        super( cause );
     }
 
     /**
+     * Constructs a new exception with the specified detail message.
+     *
      * @param msg describes the reason this exception is being thrown.
      */
     public PluginInvalidInputException( String msg )
@@ -50,24 +51,14 @@ public class PluginInvalidInputException
     }
 
     /**
+     * Constructs a new exception with the specified detail message and cause.
+     *
      * @param msg describes the reason this exception is being thrown.
      * @param cause underlying exception that caused this to be thrown
      */
     public PluginInvalidInputException( String msg, Throwable cause )
     {
-        this( msg );
-        this.cause = cause;
-    }
-
-    /**
-     * Return the cause of this exception (if any) as specified in the exception constructor.
-     * 
-     * @since 1.8
-     */
-    @Override
-    public Throwable getCause()
-    {
-        return cause;
+        super( msg, cause );
     }
 
 }



Mime
View raw message