jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r374389 - in /incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit: ./ core/ core/fs/ core/nodetype/ core/nodetype/xml/ core/observation/ core/state/ core/virtual/
Date Thu, 02 Feb 2006 14:02:17 GMT
Author: jukka
Date: Thu Feb  2 06:02:05 2006
New Revision: 374389

URL: http://svn.apache.org/viewcvs?rev=374389&view=rev
Log:
Removed exception constructors without a string message argument because all exceptions should
have an explanatory message.
Added explanatory messages to places where exceptions were thrown without them.

Modified:
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/BaseException.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TransactionException.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/fs/FileSystemException.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidConstraintException.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidNodeTypeDefException.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeConflictException.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/observation/ChangeLogBasedHierarchyMgr.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemStateException.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NoSuchItemStateException.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/StaleItemStateException.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/BaseException.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/BaseException.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/BaseException.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/BaseException.java
Thu Feb  2 06:02:05 2006
@@ -24,14 +24,6 @@
 public abstract class BaseException extends Exception {
 
     /**
-     * Constructs a new instance of this class with <code>null</code> as its
-     * detail message.
-     */
-    public BaseException() {
-        super();
-    }
-
-    /**
      * Constructs a new instance of this class with the specified detail
      * message.
      *
@@ -52,15 +44,6 @@
      */
     public BaseException(String message, Throwable rootCause) {
         super(message, rootCause);
-    }
-
-    /**
-     * Constructs a new instance of this class with the specified root cause.
-     *
-     * @param rootCause root failure cause
-     */
-    public BaseException(Throwable rootCause) {
-        super(rootCause);
     }
 
 }

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TransactionException.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TransactionException.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TransactionException.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TransactionException.java
Thu Feb  2 06:02:05 2006
@@ -34,15 +34,6 @@
     }
 
     /**
-     * Creates an instance of this class. Takes a root throwable as parameter.
-     *
-     * @param rootCause root throwable
-     */
-    public TransactionException(Throwable rootCause) {
-        super(rootCause);
-    }
-
-    /**
      * Creates an instance of this class. Takes a message and a root throwable
      * as parameter.
      *

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/fs/FileSystemException.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/fs/FileSystemException.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/fs/FileSystemException.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/fs/FileSystemException.java
Thu Feb  2 06:02:05 2006
@@ -24,13 +24,6 @@
  * implementations.
  */
 public class FileSystemException extends BaseException {
-    /**
-     * Constructs a new instance of this class with <code>null</code> as its
-     * detail message.
-     */
-    public FileSystemException() {
-        super();
-    }
 
     /**
      * Constructs a new instance of this class with the specified detail
@@ -55,12 +48,4 @@
         super(message, rootCause);
     }
 
-    /**
-     * Constructs a new instance of this class with the specified root cause.
-     *
-     * @param rootCause root failure cause
-     */
-    public FileSystemException(Throwable rootCause) {
-        super(rootCause);
-    }
 }

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidConstraintException.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidConstraintException.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidConstraintException.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidConstraintException.java
Thu Feb  2 06:02:05 2006
@@ -22,13 +22,6 @@
  * The <code>InvalidConstraintException</code> ...
  */
 public class InvalidConstraintException extends BaseException {
-    /**
-     * Constructs a new instance of this class with <code>null</code> as its
-     * detail message.
-     */
-    public InvalidConstraintException() {
-        super();
-    }
 
     /**
      * Constructs a new instance of this class with the specified detail
@@ -53,12 +46,4 @@
         super(message, rootCause);
     }
 
-    /**
-     * Constructs a new instance of this class with the specified root cause.
-     *
-     * @param rootCause root failure cause
-     */
-    public InvalidConstraintException(Throwable rootCause) {
-        super(rootCause);
-    }
 }

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidNodeTypeDefException.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidNodeTypeDefException.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidNodeTypeDefException.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/InvalidNodeTypeDefException.java
Thu Feb  2 06:02:05 2006
@@ -22,13 +22,6 @@
  * The <code>NodeTypeConflictException</code> ...
  */
 public class InvalidNodeTypeDefException extends BaseException {
-    /**
-     * Constructs a new instance of this class with <code>null</code> as its
-     * detail message.
-     */
-    public InvalidNodeTypeDefException() {
-        super();
-    }
 
     /**
      * Constructs a new instance of this class with the specified detail
@@ -53,12 +46,4 @@
         super(message, rootCause);
     }
 
-    /**
-     * Constructs a new instance of this class with the specified root cause.
-     *
-     * @param rootCause root failure cause
-     */
-    public InvalidNodeTypeDefException(Throwable rootCause) {
-        super(rootCause);
-    }
 }

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeConflictException.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeConflictException.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeConflictException.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeConflictException.java
Thu Feb  2 06:02:05 2006
@@ -22,13 +22,6 @@
  * The <code>NodeTypeConflictException</code> ...
  */
 public class NodeTypeConflictException extends BaseException {
-    /**
-     * Constructs a new instance of this class with <code>null</code> as its
-     * detail message.
-     */
-    public NodeTypeConflictException() {
-        super();
-    }
 
     /**
      * Constructs a new instance of this class with the specified detail
@@ -53,12 +46,4 @@
         super(message, rootCause);
     }
 
-    /**
-     * Constructs a new instance of this class with the specified root cause.
-     *
-     * @param rootCause root failure cause
-     */
-    public NodeTypeConflictException(Throwable rootCause) {
-        super(rootCause);
-    }
 }

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
Thu Feb  2 06:02:05 2006
@@ -257,7 +257,8 @@
                 try {
                     values.add(InternalValue.create(value, type, resolver));
                 } catch (RepositoryException e) {
-                    throw new InvalidNodeTypeDefException(e);
+                    throw new InvalidNodeTypeDefException(
+                            "Unable to create default value: " + value, e);
                 }
             }
             def.setDefaultValues((InternalValue[])

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/observation/ChangeLogBasedHierarchyMgr.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/observation/ChangeLogBasedHierarchyMgr.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/observation/ChangeLogBasedHierarchyMgr.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/observation/ChangeLogBasedHierarchyMgr.java
Thu Feb  2 06:02:05 2006
@@ -208,7 +208,7 @@
             if (state != null) {
                 return state;
             } else {
-                throw new NoSuchItemStateException();
+                throw new NoSuchItemStateException("Item not in the attic: " + id);
             }
         }
 

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemStateException.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemStateException.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemStateException.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemStateException.java
Thu Feb  2 06:02:05 2006
@@ -24,14 +24,6 @@
 public class ItemStateException extends BaseException {
 
     /**
-     * Constructs a new instance of this class with <code>null</code> as its
-     * detail message.
-     */
-    public ItemStateException() {
-        super();
-    }
-
-    /**
      * Constructs a new instance of this class with the specified detail
      * message.
      *
@@ -54,12 +46,4 @@
         super(message, rootCause);
     }
 
-    /**
-     * Constructs a new instance of this class with the specified root cause.
-     *
-     * @param rootCause root failure cause
-     */
-    public ItemStateException(Throwable rootCause) {
-        super(rootCause);
-    }
 }

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NoSuchItemStateException.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NoSuchItemStateException.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NoSuchItemStateException.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NoSuchItemStateException.java
Thu Feb  2 06:02:05 2006
@@ -20,13 +20,6 @@
  * The <code>NoSuchItemStateException</code> ...
  */
 public class NoSuchItemStateException extends ItemStateException {
-    /**
-     * Constructs a new instance of this class with <code>null</code> as its
-     * detail message.
-     */
-    public NoSuchItemStateException() {
-        super();
-    }
 
     /**
      * Constructs a new instance of this class with the specified detail
@@ -51,12 +44,4 @@
         super(message, rootCause);
     }
 
-    /**
-     * Constructs a new instance of this class with the specified root cause.
-     *
-     * @param rootCause root failure cause
-     */
-    public NoSuchItemStateException(Throwable rootCause) {
-        super(rootCause);
-    }
 }

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/StaleItemStateException.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/StaleItemStateException.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/StaleItemStateException.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/StaleItemStateException.java
Thu Feb  2 06:02:05 2006
@@ -23,14 +23,6 @@
 public class StaleItemStateException extends ItemStateException {
 
     /**
-     * Constructs a new instance of this class with <code>null</code> as its
-     * detail message.
-     */
-    public StaleItemStateException() {
-        super();
-    }
-
-    /**
      * Constructs a new instance of this class with the specified detail
      * message.
      *
@@ -53,12 +45,4 @@
         super(message, rootCause);
     }
 
-    /**
-     * Constructs a new instance of this class with the specified root cause.
-     *
-     * @param rootCause root failure cause
-     */
-    public StaleItemStateException(Throwable rootCause) {
-        super(rootCause);
-    }
 }

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java?rev=374389&r1=374388&r2=374389&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
Thu Feb  2 06:02:05 2006
@@ -173,7 +173,7 @@
             }
             return root;
         } catch (RepositoryException e) {
-            throw new ItemStateException(e);
+            throw new ItemStateException("Error creating root node state", e);
         }
     }
 



Mime
View raw message