jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1387918 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/CommitFailedException.java
Date Thu, 20 Sep 2012 09:06:56 GMT
Author: mduerig
Date: Thu Sep 20 09:06:56 2012
New Revision: 1387918

URL: http://svn.apache.org/viewvc?rev=1387918&view=rev
Log:
OAK-316: CommitFailedException.throwRepositoryException swallows parts of the stack traces

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/CommitFailedException.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/CommitFailedException.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/CommitFailedException.java?rev=1387918&r1=1387917&r2=1387918&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/CommitFailedException.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/CommitFailedException.java
Thu Sep 20 09:06:56 2012
@@ -39,19 +39,10 @@ public class CommitFailedException exten
     }
 
     /**
-     * Rethrow this exception cast into a {@link RepositoryException}: if the cause
-     * for this exception already is a {@code RepositoryException}, the cause is
-     * thrown. Otherwise a new {@code RepositoryException} instance with this
-     * {@code CommitFailedException} is thrown.
+     * Throw this exception wrapped into a {@link RepositoryException}
      * @throws RepositoryException
      */
     public void throwRepositoryException() throws RepositoryException {
-        Throwable cause = getCause();
-        if (cause instanceof RepositoryException) {
-            throw (RepositoryException) cause;
-        }
-        else {
-            throw new RepositoryException(cause);
-        }
+        throw new RepositoryException(this);
     }
 }



Mime
View raw message