[ 
https://issues.apache.org/jira/browse/SLING-9874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17228462#comment-17228462
 ] 

Julian Sedding commented on SLING-9874:
---------------------------------------

[~kwin] I didn't realize that a previous adapter factory implementation had 
been removed. Reading the description of SLING-6793, titled "Remove unused 
methods from XSSAPI" , it seems to me that the removal of the adapter factory 
was more of an afterthought.

Fact is that the removal of the adapter factory is a backwards compatibility 
problem [affecting real 
projects|https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/xssapi-is-null-6-5/qaq-p/324249].

In the case I am working on, the adaptation is used in a static utility, which 
in turn is used in many places, both servlets and JSPs. The advice not to use 
JSP is all nice and well, but even tough it might be worthwhile, it is not 
always practical to migrate several hundred existing JSPs to HTL.

In any case, I have just finalized the release of XSS Protection 2.2.8 earlier 
this morning. So how should we proceed from here? Remove the adapter factory 
yet again and let more people run into the backwards compatibility issue? Or do 
we keep it with little cost to the Sling project (the code is trivial) and 
restore backwards compatibility?

> Allow adapting SlingHttpServletRequest and ResourceResolver to XSSAPI
> ---------------------------------------------------------------------
>
>                 Key: SLING-9874
>                 URL: https://issues.apache.org/jira/browse/SLING-9874
>             Project: Sling
>          Issue Type: New Feature
>          Components: XSS Protection API
>    Affects Versions: XSS Protection API 2.2.6
>            Reporter: Julian Sedding
>            Assignee: Julian Sedding
>            Priority: Minor
>             Fix For: XSS Protection API 2.2.8
>
>
> Most commonly an {{XSSAPI}} instance is needed when rendering a response 
> body. In such circumstances, it can be cumbersome to retrieve the {{XSSAPI}} 
> service. To add some convenience, it would be nice to be able to adapt a 
> {{SlingHttpServletRequest}} or a {{ResourceResolver}} to an {{XSSAPI}} 
> instance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to