This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch issue/SLING-13077 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter-test-services.git
commit 25a32fb85c7c152948180225bc1345bef84c4ee2 Author: Robert Munteanu <[email protected]> AuthorDate: Fri Jan 30 17:55:41 2026 +0100 SLING-13077 - ExportServlet cannot adapt model to javax SlingHttpServletRequest when running in a Jakarta Servlet environment Inject the request in the DummyModel as a @Self member. This makes the test execution more strict and exposes additional failure scenarios. --- .../java/org/apache/sling/starter/testservices/models/DummyModel.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/apache/sling/starter/testservices/models/DummyModel.java b/src/main/java/org/apache/sling/starter/testservices/models/DummyModel.java index 3510075..8bebaf5 100644 --- a/src/main/java/org/apache/sling/starter/testservices/models/DummyModel.java +++ b/src/main/java/org/apache/sling/starter/testservices/models/DummyModel.java @@ -23,6 +23,7 @@ import javax.annotation.PostConstruct; import org.apache.sling.api.SlingHttpServletRequest; import org.apache.sling.models.annotations.Exporter; import org.apache.sling.models.annotations.Model; +import org.apache.sling.models.annotations.injectorspecific.Self; @Model(adaptables = SlingHttpServletRequest.class, resourceType = "sling/test/htl/model") @Exporter(name = "jackson", extensions = "json") @@ -30,6 +31,9 @@ public class DummyModel { private String message; + @Self + private SlingHttpServletRequest request; + @PostConstruct public void init() { message = "from-sling-model";
