This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-annotations-it.git
The following commit(s) were added to refs/heads/master by this push:
new ce938cc depend on latest annotations
ce938cc is described below
commit ce938cc4bd0cb4adffbade0d7f36e81821aca0ed
Author: Konrad Windszus <[email protected]>
AuthorDate: Wed Sep 12 08:34:44 2018 +0200
depend on latest annotations
extend test to check for extension matching for methods != GET
---
pom.xml | 4 ++--
.../testservlets/ResourceTypeBoundServletWithExtension.java | 2 +-
.../org/apache/sling/servlets/annotations/ServletRegistrationIT.java | 5 +++--
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index bd19c13..b56ce03 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,7 @@
<groupId>org.apache.sling</groupId>
<artifactId>slingstart-maven-plugin</artifactId>
<!-- for https://issues.apache.org/jira/browse/SLING-7662 -->
- <version>1.8.1-SNAPSHOT</version>
+ <version>1.8.2</version>
<extensions>true</extensions>
<executions>
<execution>
@@ -158,7 +158,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlets.annotations</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
</dependency>
<!-- testing dependencies -->
diff --git
a/src/main/java/org/apache/sling/servlets/annotations/testservlets/ResourceTypeBoundServletWithExtension.java
b/src/main/java/org/apache/sling/servlets/annotations/testservlets/ResourceTypeBoundServletWithExtension.java
index 3e02bc5..181f262 100644
---
a/src/main/java/org/apache/sling/servlets/annotations/testservlets/ResourceTypeBoundServletWithExtension.java
+++
b/src/main/java/org/apache/sling/servlets/annotations/testservlets/ResourceTypeBoundServletWithExtension.java
@@ -28,7 +28,7 @@ import
org.apache.sling.servlets.annotations.SlingServletResourceTypes;
import org.osgi.service.component.annotations.Component;
@Component(service=Servlet.class)
-@SlingServletResourceTypes(resourceTypes="/apps/sling/testservlets/ResourceTypeBoundServletWithExtension",
extensions= {"ext1", "ext2"})
+@SlingServletResourceTypes(resourceTypes="/apps/sling/testservlets/ResourceTypeBoundServletWithExtension",
extensions= {"ext1", "ext2"}, methods= {"PUT", "GET"})
public class ResourceTypeBoundServletWithExtension extends
SlingAllMethodsServlet {
/**
diff --git
a/src/test/java/org/apache/sling/servlets/annotations/ServletRegistrationIT.java
b/src/test/java/org/apache/sling/servlets/annotations/ServletRegistrationIT.java
index a1f815a..215970c 100644
---
a/src/test/java/org/apache/sling/servlets/annotations/ServletRegistrationIT.java
+++
b/src/test/java/org/apache/sling/servlets/annotations/ServletRegistrationIT.java
@@ -123,8 +123,9 @@ public class ServletRegistrationIT {
CLIENT.doGet("/content/servlettest/resourceTypeBoundServletWithExtension.html",
200); // DEFAULT GET Servlet
CLIENT.doGet("/content/servlettest/resourceTypeBoundServletWithExtension.ext1",
555);
CLIENT.doGet("/content/servlettest/resourceTypeBoundServletWithExtension.ext2",
555);
- // only GET and HEAD are supposed to be working
-
CLIENT.doPut("/content/servlettest/resourceTypeBoundServletWithExtension.ext2",
new StringEntity("some text"), Collections.emptyList(), 201);
+
CLIENT.doPut("/content/servlettest/resourceTypeBoundServletWithExtension.ext2",
new StringEntity("some text"), Collections.emptyList(), 555);
+ // extension is considered for all methods!
+
CLIENT.doPut("/content/servlettest/resourceTypeBoundServletWithExtension.someotherext",
new StringEntity("some text"), Collections.emptyList(), 201); // DEFAULT
servlet
}
@Test