GitLab Mirror pushed to branch 2.14 at cms-community / hippo-jackrabbit

Commits:
ec3b92aa by Julian Reschke at 2018-02-12T21:36:16+00:00
JCR-4237 - cleanup throws clauses of private methods (ported to 2.14)

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/branches/2.14@1824079 
13f79535-47bb-0310-9956-ffa450edef68

- - - - -


9 changed files:

- jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
- 
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
- 
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
- 
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLEditor.java
- 
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
- 
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplMerge.java
- 
jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java
- 
jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SysViewContentHandler.java
- 
jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java


Changes:

=====================================
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
=====================================
--- a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
+++ b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
@@ -408,10 +408,9 @@ public class ItemManager implements ItemStateListener {
      * in which case the itemId present with the specified <code>data</code> 
is used.
      * @return true if the item with the given <code>data</code> can be read;
      * <code>false</code> otherwise.
-     * @throws AccessDeniedException
      * @throws RepositoryException
      */
-    private boolean canRead(ItemData data, Path path) throws 
AccessDeniedException, RepositoryException {
+    private boolean canRead(ItemData data, Path path) throws 
RepositoryException {
         // JCR-1601: cached item may just have been invalidated
         ItemState state = data.getState();
         if (state == null) {


=====================================
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
=====================================
--- 
a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
+++ 
b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
@@ -644,11 +644,10 @@ public class NodeTypeManagerImpl extends 
AbstractNodeTypeManager
      *
      * @param definition the definition
      * @return a <code>NodeTypeDef</code>
-     * @throws InvalidNodeTypeDefinitionException if the definition is invalid
      * @throws RepositoryException if a repository error occurs
      */
     private QNodeTypeDefinition toNodeTypeDef(NodeTypeDefinition definition)
-            throws InvalidNodeTypeDefinitionException, RepositoryException {
+            throws RepositoryException {
         return new QNodeTypeDefinitionImpl(definition, context, 
QValueFactoryImpl.getInstance());
     }
 


=====================================
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
=====================================
--- 
a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
+++ 
b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java
@@ -155,8 +155,7 @@ class RowIteratorImpl implements RowIterator {
                     NamePathResolver resolver,
                     ValueFactory valueFactory,
                     ExcerptProvider exProvider,
-                    SpellSuggestion spellSuggestion)
-            throws NamespaceException {
+                    SpellSuggestion spellSuggestion) {
         this.scoreNodes = scoreNodes;
         this.columns = columns;
         this.selectorNames.addAll(Arrays.asList(selectorNames));


=====================================
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLEditor.java
=====================================
--- 
a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLEditor.java
+++ 
b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLEditor.java
@@ -282,10 +282,9 @@ public class ACLEditor extends ProtectedItemModifier 
implements AccessControlEdi
      *
      * @param path the path
      * @return the node
-     * @throws PathNotFoundException if not found
      * @throws RepositoryException if an error occurs
      */
-    private NodeImpl getNode(String path) throws PathNotFoundException, 
RepositoryException {
+    private NodeImpl getNode(String path) throws RepositoryException {
         return (NodeImpl) session.getNode(path);
     }
 


=====================================
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
=====================================
--- 
a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
+++ 
b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
@@ -988,8 +988,7 @@ public class SharedItemStateManager
             }
         }
 
-        private void addReferences(PropertyState property) throws 
NoSuchItemStateException,
-                ItemStateException {
+        private void addReferences(PropertyState property) throws 
ItemStateException {
             if (property.getType() == PropertyType.REFERENCE) {
                 InternalValue[] values = property.getValues();
                 for (int i = 0; values != null && i < values.length; i++) {
@@ -1019,7 +1018,7 @@ public class SharedItemStateManager
         }
 
         private void removeReferences(ItemState state)
-                throws NoSuchItemStateException, ItemStateException {
+                throws ItemStateException {
             if (!state.isNode()) {
                 PropertyState property = (PropertyState) state;
                 if (property.getType() == PropertyType.REFERENCE) {


=====================================
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplMerge.java
=====================================
--- 
a/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplMerge.java
+++ 
b/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplMerge.java
@@ -440,10 +440,8 @@ abstract public class VersionManagerImplMerge extends 
VersionManagerImplRestore 
      * Returns a set of nodeid from the jcr:mergeFailed property of the given 
state
      * @param state the state
      * @return set of node ids
-     * @throws RepositoryException if an error occurs
      */
-    private Set<NodeId> getMergeFailed(NodeStateEx state)
-            throws RepositoryException {
+    private Set<NodeId> getMergeFailed(NodeStateEx state) {
         Set<NodeId> set = new HashSet<NodeId>();
         if (state.hasProperty(NameConstants.JCR_MERGEFAILED)) {
             InternalValue[] vals = 
state.getPropertyValues(NameConstants.JCR_MERGEFAILED);


=====================================
jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java
=====================================
--- 
a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java
+++ 
b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/observation/ClientEventPoll.java
@@ -271,10 +271,8 @@ public class ClientEventPoll extends Thread {
          *
          * @param remoteEvent The {@link RemoteEventCollection.RemoteEvent} 
instance
          *      providing the data for this event.
-         *
-         * @throws RemoteException if an RMI error occurrs.
          */
-        private JCREvent(RemoteEventCollection.RemoteEvent remoteEvent) throws 
RemoteException {
+        private JCREvent(RemoteEventCollection.RemoteEvent remoteEvent) {
             remote = remoteEvent;
         }
 


=====================================
jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SysViewContentHandler.java
=====================================
--- 
a/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SysViewContentHandler.java
+++ 
b/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SysViewContentHandler.java
@@ -557,10 +557,9 @@ class SysViewContentHandler extends DefaultHandler {
      * @param nodeElem The node to check.
      * @param noRecurse Boolean if child nodes should be exported at all.
      * @throws RepositoryException
-     * @throws SAXException
      */
     private void checkChildren(NodeElemData nodeElem, boolean noRecurse)
-            throws RepositoryException, SAXException {
+            throws RepositoryException {
 
         Hashtable<String, ChildNodeElem> childElemsFound = 
nodeElem.childNodeElemNames;
         boolean totalSumOk = false;


=====================================
jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
=====================================
--- 
a/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
+++ 
b/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
@@ -770,12 +770,11 @@ public class RepositoryStartupServlet extends 
AbstractRepositoryServlet {
      * @param req the request
      * @param resp the response
      * @param loc the location for the redirect
-     * @throws ServletException if an servlet error occurs.
      * @throws IOException if an I/O error occurs.
      */
     private void redirect(HttpServletRequest req,
                           HttpServletResponse resp, String loc)
-            throws ServletException, IOException {
+            throws IOException {
         String cp = req.getContextPath();
         if (cp == null || cp.equals("/")) {
             cp = "";



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-jackrabbit/commit/ec3b92aa00e5e0197ae787103c6a40f8b04e6f94

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-jackrabbit/commit/ec3b92aa00e5e0197ae787103c6a40f8b04e6f94
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to