Roy Teeuwen created SLING-12372:
-----------------------------------

             Summary: ModelAdapterFactory is not cleaning up the requests 
correctly
                 Key: SLING-12372
                 URL: https://issues.apache.org/jira/browse/SLING-12372
             Project: Sling
          Issue Type: Bug
            Reporter: Roy Teeuwen


With the recent changes in Apache Felix of making Felix compatible with both 
javax and jakarta, new ServletRequestWrappers were introduced:

[https://github.com/apache/felix-dev/blob/master/http/wrappers/src/main/java/org/apache/felix/http/javaxwrappers/ServletRequestWrapper.java#L79]

This causes issues for the cleanup / disposing of requests after a 
requestDestroyed event is caught in the ModelAdapterFactory, namely there is a 
check if the request is of type javax.http.ServletRequestWrapper, which no 
longer matches with org.apache.felix.http.javaxwrappers.ServletRequestWrapper:

[https://github.com/apache/sling-org-apache-sling-models-impl/blob/master/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java#L796]

This causes the callbacks to never be cleaned up, because the original 
ServletRequest is not matched seeing as it is a new wrapper object compared to 
the one that was put.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to