You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by en...@apache.org on 2021/05/21 04:52:26 UTC
[sling-org-apache-sling-jcr-jackrabbit-accessmanager] branch master
updated: SLING-10034 AccessManager - Switch to MediaRangeList from
sling.api
This is an automated email from the ASF dual-hosted git repository.
enorman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-accessmanager.git
The following commit(s) were added to refs/heads/master by this push:
new 5eec4b4 SLING-10034 AccessManager - Switch to MediaRangeList from sling.api
5eec4b4 is described below
commit 5eec4b4be162aec9452200269e9922d6c6182594
Author: Eric Norman <en...@apache.org>
AuthorDate: Thu May 20 21:52:13 2021 -0700
SLING-10034 AccessManager - Switch to MediaRangeList from sling.api
---
bnd.bnd | 2 --
pom.xml | 4 ++--
.../jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java | 4 ++--
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/bnd.bnd b/bnd.bnd
index 2c4a017..38eb440 100644
--- a/bnd.bnd
+++ b/bnd.bnd
@@ -1,5 +1,3 @@
--includeresource:\
- @org.apache.sling.servlets.post-*.jar!/org/apache/sling/servlets/post/impl/helper/MediaRangeList*
-removeheaders:\
Include-Resource,\
diff --git a/pom.xml b/pom.xml
index b76e9f6..169ed1d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,7 +81,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
- <version>2.11.0</version>
+ <version>2.23.4</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -132,7 +132,7 @@
<artifactId>org.apache.sling.testing.sling-mock.junit4</artifactId>
<version>2.3.4</version>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.sling-mock-oak</artifactId>
diff --git a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java
index 0ae10ed..1cb0120 100644
--- a/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java
+++ b/src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/post/AbstractAccessPostServlet.java
@@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.request.header.MediaRangeList;
import org.apache.sling.api.resource.ResourceNotFoundException;
import org.apache.sling.api.resource.ResourceUtil;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;
@@ -47,7 +48,6 @@ import org.apache.sling.servlets.post.Modification;
import org.apache.sling.servlets.post.PostResponse;
import org.apache.sling.servlets.post.PostResponseCreator;
import org.apache.sling.servlets.post.SlingPostConstants;
-import org.apache.sling.servlets.post.impl.helper.MediaRangeList;
import org.osgi.framework.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -121,7 +121,7 @@ public abstract class AbstractAccessPostServlet extends SlingAllMethodsServlet {
} catch (ResourceNotFoundException rnfe) {
response.setStatus(HttpServletResponse.SC_NOT_FOUND,
rnfe.getMessage());
- } catch (Throwable throwable) {
+ } catch (Exception throwable) {
log.debug(String.format("Exception while handling POST %s with %s",
request.getResource().getPath(), getClass().getName()), throwable);
response.setError(throwable);