Robert Munteanu created SLING-13083:
---------------------------------------

             Summary: Code acessing the "request-parts-iterator"  request 
attribute broken after migration to Jakarta
                 Key: SLING-13083
                 URL: https://issues.apache.org/jira/browse/SLING-13083
             Project: Sling
          Issue Type: Bug
          Components: Engine
    Affects Versions: Engine 3.0.0
            Reporter: Robert Munteanu
            Assignee: Robert Munteanu
             Fix For: Engine 3.0.2


When processing multi-part uploads and streamed processing has been requested 
the Sling Engine sets a request attribute named "request-parts-iterator" which 
exposes the parts.

Up til now this the parts where of type {{javax.servlet.http.Part}} but this 
changed to {{jakarta.servlet.http.Part}}, breaking client code

{noformat}
java.lang.ClassCastException: class 
org.apache.sling.engine.impl.parameters.RequestPartsIterator$StreamedRequestPart
 cannot be cast to class javax.servlet.http.Part 
(org.apache.sling.engine.impl.parameters.RequestPartsIterator$StreamedRequestPart
 is in unnamed module of loader 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @301fece8; 
javax.servlet.http.Part is in unnamed module of loader 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @14dca4f6)
{noformat}



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

Reply via email to