[ 
https://issues.apache.org/jira/browse/WW-5382?focusedWorklogId=898169&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-898169
 ]

ASF GitHub Bot logged work on WW-5382:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Jan/24 08:58
            Start Date: 05/Jan/24 08:58
    Worklog Time Spent: 10m 
      Work Description: kusalk commented on code in PR #826:
URL: https://github.com/apache/struts/pull/826#discussion_r1442635314


##########
core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java:
##########
@@ -988,18 +1031,7 @@ protected boolean isMultipartRequest(HttpServletRequest 
request) {
      * @return a multi part request object
      */
     protected MultiPartRequest getMultiPartRequest() {
-        MultiPartRequest mpr = null;
-        //check for alternate implementations of MultiPartRequest
-        Set<String> multiNames = 
getContainer().getInstanceNames(MultiPartRequest.class);
-        for (String multiName : multiNames) {
-            if (multiName.equals(multipartHandlerName)) {
-                mpr = getContainer().getInstance(MultiPartRequest.class, 
multiName);
-            }
-        }
-        if (mpr == null) {
-            mpr = getContainer().getInstance(MultiPartRequest.class);
-        }
-        return mpr;
+        return getContainer().getInstance(MultiPartRequest.class);

Review Comment:
   `MultiPartRequest` is prototype scope and we need a unique instance per 
request so injecting it once wouldn't work here





Issue Time Tracking
-------------------

    Worklog Id:     (was: 898169)
    Time Spent: 2h 10m  (was: 2h)

> Stale configuration persists after configuration reload
> -------------------------------------------------------
>
>                 Key: WW-5382
>                 URL: https://issues.apache.org/jira/browse/WW-5382
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 6.3.0
>            Reporter: Kusal Kithul-Godage
>            Priority: Major
>             Fix For: 6.4.0
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>




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

Reply via email to