You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by js...@apache.org on 2026/08/15 13:32:35 UTC
(sling-org-apache-sling-servlets-resolver) 11/28: SLING-12643 : Support Jakarta ServletAPI in Scripting (Initial support)
This is an automated email from the ASF dual-hosted git repository.
jsedding pushed a commit to branch resolver-2.x-backports
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-resolver.git
commit b80d47febb6541837ab5b00e053834a260cce35d
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Apr 23 18:39:09 2025 +0200
SLING-12643 : Support Jakarta ServletAPI in Scripting (Initial support)
(cherry picked from commit 504321ffea506f3ae1e1cbdb14cc295b252b8e5a)
---
.../sling/servlets/resolver/internal/ScriptResourceDecorator.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/sling/servlets/resolver/internal/ScriptResourceDecorator.java b/src/main/java/org/apache/sling/servlets/resolver/internal/ScriptResourceDecorator.java
index 940d161..da94ad2 100644
--- a/src/main/java/org/apache/sling/servlets/resolver/internal/ScriptResourceDecorator.java
+++ b/src/main/java/org/apache/sling/servlets/resolver/internal/ScriptResourceDecorator.java
@@ -34,7 +34,7 @@ import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
-@Component
+@Component(service = ResourceDecorator.class)
public class ScriptResourceDecorator implements ResourceDecorator {
private final MergingServletResourceProvider provider;
@@ -44,7 +44,7 @@ public class ScriptResourceDecorator implements ResourceDecorator {
}
@Override
- public Resource decorate(Resource resource) {
+ public Resource decorate(final Resource resource) {
String path = ResourceUtil.normalize(resource.getPath());
if (this.provider.isRootOf(path)) {
String resolutionPath = resource.getResourceMetadata().getResolutionPath();
@@ -73,7 +73,7 @@ public class ScriptResourceDecorator implements ResourceDecorator {
return decorate(resource);
}
- private Resource getResource(Resource resource, String path) {
+ private Resource getResource(final Resource resource, final String path) {
return provider.getResource(
new ResolveContext<Void>() {
@Override