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:59 UTC
[sling-org-apache-sling-testing-sling-mock] 09/19: SLING-848 revert
updating sling api/resource resolver/jcr resource dependenciens - using
sling mock in a project should not enforce using the latest version of
those keep adding of getThreadResourceResolver() method,
but throw UnsupportedOperationException
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 3325972053033462fbd075546a50546d5d07205f
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Feb 18 22:54:28 2015 +0000
SLING-848 revert updating sling api/resource resolver/jcr resource dependenciens - using sling mock in a project should not enforce using the latest version of those
keep adding of getThreadResourceResolver() method, but throw UnsupportedOperationException
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1660759 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 6 +++---
.../sling/testing/mock/sling/MockJcrResourceResolverFactory.java | 6 ++----
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index c34518c..64c4222 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,13 +81,13 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
- <version>2.8.1-SNAPSHOT</version>
+ <version>2.4.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.resourceresolver</artifactId>
- <version>1.1.15-SNAPSHOT</version>
+ <version>1.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -99,7 +99,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.resource</artifactId>
- <version>2.4.5-SNAPSHOT</version>
+ <version>2.3.6</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverFactory.java b/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverFactory.java
index 60f3915..d948434 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverFactory.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/MockJcrResourceResolverFactory.java
@@ -29,7 +29,6 @@ import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ResourceResolverFactory;
import org.apache.sling.jcr.api.SlingRepository;
import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory;
-import org.apache.sling.jcr.resource.internal.helper.jcr.PathMapper;
import org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl;
import org.apache.sling.resourceresolver.impl.ResourceAccessSecurityTracker;
import org.apache.sling.resourceresolver.impl.ResourceResolverImpl;
@@ -68,7 +67,6 @@ class MockJcrResourceResolverFactory implements ResourceResolverFactory {
// setup mocked JCR environment
bundleContext.registerService(SlingRepository.class.getName(), this.slingRepository, null);
- bundleContext.registerService(PathMapper.class.getName(), new PathMapper(), null);
// setup real sling JCR resource provider implementation for use in
// mocked context
@@ -127,9 +125,9 @@ class MockJcrResourceResolverFactory implements ResourceResolverFactory {
return getResourceResolverInternal(authenticationInfo, true);
}
- @Override
+ // part of Sling API 2.8
public ResourceResolver getThreadResourceResolver() {
- return null;
+ throw new UnsupportedOperationException();
}
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.