You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:21:40 UTC

[sling-org-apache-sling-testing-resourceresolver-mock] annotated tag org.apache.sling.testing.resourceresolver-mock-1.1.14 created (now 0d5910b)

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

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


      at 0d5910b  (tag)
 tagging 411acdbe17c4d5dd92a892eefbf061ffefed9a93 (commit)
      by Stefan Seifert
      on Fri Jun 10 12:15:33 2016 +0000

- Log -----------------------------------------------------------------
org.apache.sling.testing.resourceresolver-mock-1.1.14
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new cb4683b  Add new testing module for easy mocking of a resource resolver
     new 3f7aa2f  Prepare release
     new 831dff1  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-0.1.0
     new 3b6ae6f  [maven-release-plugin] prepare for next development iteration
     new 23d5aa0  Back to current snapshot
     new 2766d00  Use released versions after release.
     new 3888b8d  Correct reactor pom and update to parent pom 16
     new 6121894  Update to latest parent pom
     new 865d7f5  Update to parent pom 18
     new af4baf2  SLING-3354 : Search paths are returned in wrong order
     new 3a63d32  SLING-3355 : Add helper methods for creating resources
     new 518a6e2  SLING-3355 : Add helper methods for creating resources
     new 812de29  Refactoring and javadoc updates
     new e71efcd  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-0.2.0
     new 8104e98  [maven-release-plugin] prepare for next development iteration
     new b03ae42  SLING-3417 : Search paths must end with a slash
     new 58cd751  Update to parent pom v19
     new bad61a3  Updated to parent version 20
     new 7d7fab1  SLING-3847 : MockResourceResolver: resource order is not preserved in listChildren method. Apply patch from Stefan Seifert
     new 6eecd9a  SLING-3853 : MockResourceResolver does not extend SlingAdaptable. Apply patch from Stefan Seifert
     new 0aac1b6  Update to latest Sling API
     new b290dc8  Use latest API snapshot during release
     new c41abfc  Use released SLING API
     new b3bfb41  SLING-3889 Make compatible to JCR resource
     new f736863  SLING-3889 fix issue where creating a resources fails when deleting it before without committing refactor unit tests and add a new unit test suite for create/delete scenarios
     new 8007bcc  SLING-3889 Emulate feature of JCR resource implementation that allows adapting to InputStream for nt:file and nt:resource nodes.
     new 62799ae  SLING-3889 Add optional support for namespace mangling and unmangling
     new 83d8244  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-0.3.0
     new 18e06d4  [maven-release-plugin] prepare for next development iteration
     new 83c50aa  Update to Sling Parent POM 22 with baselining enabled
     new 828e085  SLING-4033 Lower Sling API Dependency to 2.4.0
     new 139e206  SLING-4033 fix InputStream problem with API versions <= 2.6.0 add maven profiles to run unit tests against different API versions
     new e0f90a9  SLING-4038 Normalize path in getResource(String) method
     new 2224d2d  SLING-4039 Support ISO8601 date string to Calendar conversion
     new 183c25a  SLING-4040 Return null for getResource für null path
     new d5f3eff  SLING-4042 move all mock projects to mocks/ subdirectory
     new ae0bc15  SLING-4042 add README files
     new acc0ade  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.0.0
     new b6de553  [maven-release-plugin] rollback the release of org.apache.sling.testing.resourceresolver-mock-1.0.0
     new 4e25aca  add/update SCM urls
     new a0f7ad4  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.0.0
     new 3db049e  [maven-release-plugin] prepare for next development iteration
     new 50f242e  SLING-4108 JCR/Sling/ResourceResolver Mock: Support providing authentication info
     new de72f6a  fix some javadoc errors and warnings
     new 1a4461e  SLING-4229 resourceresolver-mock: Provide child resource access in ValueMap
     new 5e9bdd9  fix some javadoc errors/warnings
     new 41febc3  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.0
     new d32e922  [maven-release-plugin] prepare for next development iteration
     new 25a9447  SLING-4265 - Tolerate a null class argument passed to MockValueMap.get(String, Class<T>)
     new 9c81777  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.2
     new 21d8627  [maven-release-plugin] prepare for next development iteration
     new 71377da  SLING-4376 ResourceResolver.resolve(null) should resolve to root resource
     new 6339650  SLING-4384 MockResourceResolver: Methods that are not implemented should throw UnsupportedOperationException
     new 566195c  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.4
     new 2bbfa91  [maven-release-plugin] prepare for next development iteration
     new e8ce0e7  SLING-4500: make sure that root has a primary type
     new fdcda18  SLING-4698 - Set parent.relativePath to empty for all modules
     new a35c017  SLING-4723 resourceresolver-mock: Make sure type conversion on write is applied on putAll method as well
     new f7b6d80  SLING-4626 NullPointerExceptions in MockResourceResolver (patch provided by Joel Richard)
     new 505bf6f  introduce package-info.java
     new 77a942b  SLING-4738 MockValueMap should also throw UOE for modification operations
     new 84575dd  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.6
     new 7658f8b  [maven-release-plugin] prepare for next development iteration
     new a982362  Update to Sling Parent 23
     new fa73fa4  Testing: remove superflous sling.java.version=6 as it's the default now
     new 167f390  set parent version to 24 and add empty relativePath where missing
     new 4585587  SLING-4850 MockValueMap should implement containsKey
     new 0dcb894  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.8
     new b37f549  [maven-release-plugin] prepare for next development iteration
     new 34bf185  SLING-5007 resourceresolver-mock: listChildren broken for root path "/"
     new fc379a7  cosmetic: add toString method to ReadOnlyValueMapDecorator
     new 6b451c6  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.10
     new f4e4f1a  [maven-release-plugin] prepare for next development iteration
     new b0c7dd0  Update the main reactor to parent 25
     new 76e1653  SLING-5161 Support new resource resolver methods in the mocks
     new 8604907  Switch to parent pom 26
     new 453379d  SLING-5161 adapt to latest signature of the new methods
     new dfa90da  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.12
     new 5f16654  [maven-release-plugin] prepare for next development iteration
     new be37366  cosmetic: move supported method out of 'unsupported methods' block, add API hints
     new 575c789  SLING-5673 MockResourceResolver.resolve(...) might return null
     new 472d308  [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.14
     new 411acdb  [maven-release-plugin] copy for tag org.apache.sling.testing.resourceresolver-mock-1.1.14

The 83 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-testing-resourceresolver-mock] 04/05: [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.14

Posted by ro...@apache.org.
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.14
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-resourceresolver-mock.git

commit 472d3084a3e3c53c7e67aa17221eac750de09716
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Jun 10 12:15:17 2016 +0000

    [maven-release-plugin] prepare release org.apache.sling.testing.resourceresolver-mock-1.1.14
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/resourceresolver-mock@1747698 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index f1a92db..4aa200c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.resourceresolver-mock</artifactId>
-    <version>1.1.13-SNAPSHOT</version>
+    <version>1.1.14</version>
 
     <name>Apache Sling Testing Resource Resolver Mock</name>
     <description>
@@ -36,9 +36,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/resourceresolver-mock</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/resourceresolver-mock</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/resourceresolver-mock</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.resourceresolver-mock-1.1.14</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.resourceresolver-mock-1.1.14</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.resourceresolver-mock-1.1.14</url>
     </scm>
 
     <reporting>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-resourceresolver-mock] 02/05: cosmetic: move supported method out of 'unsupported methods' block, add API hints

Posted by ro...@apache.org.
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.14
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-resourceresolver-mock.git

commit be37366dc3fafad7edd4233e2d0d36f2b1691958
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Sat Feb 6 08:11:48 2016 +0000

    cosmetic: move supported method out of 'unsupported methods' block, add API hints
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/resourceresolver-mock@1728793 13f79535-47bb-0310-9956-ffa450edef68
---
 .../resourceresolver/MockResourceResolver.java        | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 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 2e2201e..dbb5901 100644
--- a/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
+++ b/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
@@ -371,6 +371,15 @@ public class MockResourceResolver extends SlingAdaptable implements ResourceReso
         return this.listChildren(resource).hasNext();
     }
 
+    // part of Resource API 2.11.0
+    public Resource getParent(Resource child) {
+        final String parentPath = ResourceUtil.getParent(child.getPath());
+        if (parentPath == null) {
+            return null;
+        }
+        return this.getResource(parentPath);
+    }
+
 
     // --- unsupported operations ---
 
@@ -405,18 +414,12 @@ public class MockResourceResolver extends SlingAdaptable implements ResourceReso
         throw new UnsupportedOperationException();
     }
 
-    public Resource getParent(Resource child) {
-        final String parentPath = ResourceUtil.getParent(child.getPath());
-        if (parentPath == null) {
-            return null;
-        }
-        return this.getResource(parentPath);
-    }
-
+    // part of Resource API 2.11.0
     public Resource copy(String srcAbsPath, String destAbsPath) throws PersistenceException {
         throw new UnsupportedOperationException();
     }
 
+    // part of Resource API 2.11.0
     public Resource move(String srcAbsPath, String destAbsPath) throws PersistenceException {
         throw new UnsupportedOperationException();
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-resourceresolver-mock] 05/05: [maven-release-plugin] copy for tag org.apache.sling.testing.resourceresolver-mock-1.1.14

Posted by ro...@apache.org.
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.14
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-resourceresolver-mock.git

commit 411acdbe17c4d5dd92a892eefbf061ffefed9a93
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Jun 10 12:15:33 2016 +0000

    [maven-release-plugin] copy for tag org.apache.sling.testing.resourceresolver-mock-1.1.14
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.resourceresolver-mock-1.1.14@1747699 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-resourceresolver-mock] 03/05: SLING-5673 MockResourceResolver.resolve(...) might return null

Posted by ro...@apache.org.
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.14
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-resourceresolver-mock.git

commit 575c7894028a3caad072e97a33ff468722bb4ea7
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Apr 29 16:21:49 2016 +0000

    SLING-5673 MockResourceResolver.resolve(...) might return null
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/resourceresolver-mock@1741654 13f79535-47bb-0310-9956-ffa450edef68
---
 .../testing/resourceresolver/MockResourceResolver.java    |  7 ++++++-
 .../resourceresolver/SlingCrudResourceResolverTest.java   | 15 +++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

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 dbb5901..fe5bbb4 100644
--- a/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
+++ b/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
@@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletRequest;
 import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.adapter.SlingAdaptable;
 import org.apache.sling.api.resource.LoginException;
+import org.apache.sling.api.resource.NonExistingResource;
 import org.apache.sling.api.resource.PersistenceException;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
@@ -96,7 +97,11 @@ public class MockResourceResolver extends SlingAdaptable implements ResourceReso
         // build full path again
         path = path + (urlRemainder != null ? urlRemainder : "");
 
-        return this.getResource(path);
+        Resource resource = this.getResource(path);
+        if (resource == null) {
+            resource = new NonExistingResource(this, absPath);
+        }
+        return resource;
     }
 
     @Override
diff --git a/src/test/java/org/apache/sling/testing/resourceresolver/SlingCrudResourceResolverTest.java b/src/test/java/org/apache/sling/testing/resourceresolver/SlingCrudResourceResolverTest.java
index 7cbe7e0..ff4537c 100644
--- a/src/test/java/org/apache/sling/testing/resourceresolver/SlingCrudResourceResolverTest.java
+++ b/src/test/java/org/apache/sling/testing/resourceresolver/SlingCrudResourceResolverTest.java
@@ -36,6 +36,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.jackrabbit.util.ISO8601;
 import org.apache.sling.api.resource.LoginException;
 import org.apache.sling.api.resource.ModifiableValueMap;
+import org.apache.sling.api.resource.NonExistingResource;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceUtil;
@@ -247,4 +248,18 @@ public class SlingCrudResourceResolverTest {
         assertEquals("/", rootResource.getPath());
     }
 
+    @Test
+    public void testResolveExistingResource() {
+        Resource resource = resourceResolver.resolve(testRoot.getPath() + "/node1");
+        assertNotNull(resource);
+        assertEquals(testRoot.getPath() + "/node1", resource.getPath());
+    }
+    
+    @Test
+    public void testResolveNonexistingResource() {
+        Resource resource = resourceResolver.resolve("/non/existing/path");
+        assertTrue(resource instanceof NonExistingResource);
+        assertEquals("/non/existing/path", resource.getPath());
+    }
+    
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-resourceresolver-mock] 01/05: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
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.14
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-resourceresolver-mock.git

commit 5f166543e53213b1217d4484d2626b8be455b7b3
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Feb 5 22:30:01 2016 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/resourceresolver-mock@1728757 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index c72bb6c..f1a92db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.resourceresolver-mock</artifactId>
-    <version>1.1.12</version>
+    <version>1.1.13-SNAPSHOT</version>
 
     <name>Apache Sling Testing Resource Resolver Mock</name>
     <description>
@@ -36,9 +36,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.resourceresolver-mock-1.1.12</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.resourceresolver-mock-1.1.12</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.resourceresolver-mock-1.1.12</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/resourceresolver-mock</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/resourceresolver-mock</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/resourceresolver-mock</url>
     </scm>
 
     <reporting>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.