ghenzler commented on a change in pull request #10:
URL:
https://github.com/apache/sling-org-apache-sling-engine/pull/10#discussion_r498743213
##########
File path: src/main/java/org/apache/sling/engine/impl/request/RequestData.java
##########
@@ -262,10 +260,14 @@ public Resource initResource(ResourceResolver
resourceResolver) {
public void initServlet(final Resource resource,
final ServletResolver sr) {
// the resource and the request path info, will never be null
- RequestPathInfo requestPathInfo = new SlingRequestPathInfo(resource);
- ContentData contentData = setContent(resource, requestPathInfo);
-
- requestProgressTracker.log("Resource Path Info: {0}",
requestPathInfo);
+ SlingUri slingUri = (SlingUri)
getSlingRequest().getAttribute(AuthenticationSupport.REQUEST_ATTRIBUTE_URI);
Review comment:
The problem was a bit that initResource() already returns a resource and
using `slingUri` as member var would put a bit duplication on the object
(`currentContentData` is already a field and `slingUri` contains some of the
same information) - but I agree using the request att again is not really nice
either, I'll find a solution
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]