jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1329921 - in /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr: NodeImpl.java SessionImpl.java WorkspaceImpl.java
Date Tue, 24 Apr 2012 18:39:37 GMT
Author: jukka
Date: Tue Apr 24 18:39:37 2012
New Revision: 1329921

URL: http://svn.apache.org/viewvc?rev=1329921&view=rev
Log:
OAK-15: Clean up oak-jcr

Throw UnsupportedRepositoryExceptions instead of returning null values to make potential problems
easier to catch

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java?rev=1329921&r1=1329920&r2=1329921&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Tue Apr 24 18:39:37 2012
@@ -520,9 +520,7 @@ public class NodeImpl extends ItemImpl i
     @Override
     public PropertyIterator getReferences(String name) throws RepositoryException {
         checkStatus();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     /**
@@ -536,9 +534,7 @@ public class NodeImpl extends ItemImpl i
     @Override
     public PropertyIterator getWeakReferences(String name) throws RepositoryException {
         checkStatus();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     @Override
@@ -654,18 +650,14 @@ public class NodeImpl extends ItemImpl i
     @Override
     public NodeDefinition getDefinition() throws RepositoryException {
         checkStatus();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
 
     @Override
     public String getCorrespondingNodePath(String workspaceName) throws RepositoryException
{
         checkStatus();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
 
@@ -822,8 +814,7 @@ public class NodeImpl extends ItemImpl i
 
     @Override
     public NodeIterator getSharedSet() throws RepositoryException {
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     @Override

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java?rev=1329921&r1=1329920&r2=1329921&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
Tue Apr 24 18:39:37 2012
@@ -108,9 +108,7 @@ public class SessionImpl extends Abstrac
     @Override
     public Session impersonate(Credentials credentials) throws RepositoryException {
         ensureIsAlive();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     @Override
@@ -130,17 +128,13 @@ public class SessionImpl extends Abstrac
     @Override
     public Node getNodeByUUID(String uuid) throws RepositoryException {
         ensureIsAlive();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     @Override
     public Node getNodeByIdentifier(String id) throws RepositoryException {
         ensureIsAlive();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     //------------------------------------------------------------< Writing >---
@@ -214,9 +208,7 @@ public class SessionImpl extends Abstrac
     @Override
     public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior)
throws RepositoryException {
         ensureIsAlive();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     //------------------------------------------------------------< Locking >---
@@ -288,9 +280,7 @@ public class SessionImpl extends Abstrac
     @Override
     public AccessControlManager getAccessControlManager() throws RepositoryException {
         ensureIsAlive();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     //----------------------------------------------------------< Retention >---

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java?rev=1329921&r1=1329920&r2=1329921&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/WorkspaceImpl.java
Tue Apr 24 18:39:37 2012
@@ -142,9 +142,7 @@ public class WorkspaceImpl implements Ja
     public LockManager getLockManager() throws RepositoryException {
         ensureIsAlive();
         ensureSupportedOption(Repository.OPTION_LOCKING_SUPPORTED);
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     @Override
@@ -169,27 +167,21 @@ public class WorkspaceImpl implements Ja
     @Override
     public NodeTypeManager getNodeTypeManager() throws RepositoryException {
         ensureIsAlive();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     @Override
     public ObservationManager getObservationManager() throws RepositoryException {
         ensureSupportedOption(Repository.OPTION_OBSERVATION_SUPPORTED);
         ensureIsAlive();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     @Override
     public VersionManager getVersionManager() throws RepositoryException {
         ensureIsAlive();
         ensureSupportedOption(Repository.OPTION_VERSIONING_SUPPORTED);
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     @Override
@@ -205,9 +197,7 @@ public class WorkspaceImpl implements Ja
     public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior)
throws RepositoryException {
         ensureSupportedOption(Repository.LEVEL_2_SUPPORTED);
         ensureIsAlive();
-
-        // TODO
-        return null;
+        throw new UnsupportedRepositoryOperationException("TODO");
     }
 
     @SuppressWarnings("deprecation")



Mime
View raw message