This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag 
org.apache.sling.testing.resourceresolver-mock-1.1.10
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-resourceresolver-mock.git

commit 6339650643999f4b3e0d80b14aae18010c3f8e59
Author: Stefan Seifert <[email protected]>
AuthorDate: Tue Feb 3 09:52:03 2015 +0000

    SLING-4384 MockResourceResolver: Methods that are not implemented should 
throw UnsupportedOperationException
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/resourceresolver-mock@1656658
 13f79535-47bb-0310-9956-ffa450edef68
---
 .../resourceresolver/MockResourceResolver.java     | 70 +++++++++++-----------
 1 file changed, 35 insertions(+), 35 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
 
b/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
index d17a782..86a4a3f 100644
--- 
a/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
+++ 
b/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
@@ -104,12 +104,6 @@ public class MockResourceResolver extends SlingAdaptable 
implements ResourceReso
     }
 
     @Override
-    @Deprecated
-    public Resource resolve(final HttpServletRequest request) {
-        return null;
-    }
-
-    @Override
     public String map(final String resourcePath) {
         return map(null, resourcePath);
     }
@@ -246,25 +240,6 @@ public class MockResourceResolver extends SlingAdaptable 
implements ResourceReso
     }
 
     @Override
-    public Iterator<Resource> findResources(final String query, final String 
language) {
-        final List<Resource> emptyList = Collections.emptyList();
-        return emptyList.iterator();
-    }
-
-    @Override
-    public Iterator<Map<String, Object>> queryResources(String query,
-            String language) {
-        final List<Map<String, Object>> emptyList = Collections.emptyList();
-        return emptyList.iterator();
-    }
-
-    @Override
-    public ResourceResolver clone(Map<String, Object> authenticationInfo)
-            throws LoginException {
-        return null;
-    }
-
-    @Override
     public boolean isLive() {
         return true;
     }
@@ -373,16 +348,6 @@ public class MockResourceResolver extends SlingAdaptable 
implements ResourceReso
     }
 
     @Override
-    public String getParentResourceType(Resource resource) {
-        return null;
-    }
-
-    @Override
-    public String getParentResourceType(String resourceType) {
-        return null;
-    }
-
-    @Override
     public boolean isResourceType(Resource resource, String resourceType) {
         return resource.getResourceType().equals(resourceType);
     }
@@ -400,4 +365,39 @@ public class MockResourceResolver extends SlingAdaptable 
implements ResourceReso
     public boolean hasChildren(Resource resource) {
         return this.listChildren(resource).hasNext();
     }
+
+
+    // --- unsupported operations ---
+
+    @Override
+    @Deprecated
+    public Resource resolve(final HttpServletRequest request) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getParentResourceType(Resource resource) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getParentResourceType(String resourceType) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Iterator<Resource> findResources(final String query, final String 
language) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Iterator<Map<String, Object>> queryResources(String query, String 
language) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public ResourceResolver clone(Map<String, Object> authenticationInfo) 
throws LoginException {
+        throw new UnsupportedOperationException();
+    }
+
 }

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to