Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-91398

ScopedBeanManagerThreadLocal only pushes a ScopedBeanManager onto the stack if the stack is empty

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.1.0 CE GA1, 7.1.10 DXP GA1, 7.1.10 DXP FP1, 7.1.10 DXP FP2, 7.1.10 DXP FP3, 7.1.1 CE GA2, 7.1.10 DXP FP4, 7.1.10 DXP FP5, 7.1.10.1 SP1, 7.1.2 CE GA3, 7.1.10 DXP FP6, 7.1.10 DXP FP7, 7.1.10 DXP FP8
    • Fix Version/s: 7.1.X, Master
    • Labels:
      None

      Description

      Problem Overview

      There is a fragment of code in ScopedBeanManagerThreadLocal.invokeWithScopedBeanManager() currently looks like this:

      ScopedBeanManagerThreadLocal.java
      boolean empty = scopedBeanManagers.isEmpty();
      
      if (empty) {
      	scopedBeanManagers.push(supplier.get());
      }
      

      This must be a leftover from an earlier design. It is always necessary to push the ScopedBeanManager onto the stack if the stack – not simply when it is empty.

      Instead the code fragment should look like the following:

      ScopedBeanManagerThreadLocal.java
      scopedBeanManagers.push(supplier.get());
      

      Steps to Reproduce

      There is no reproducer portlet for this issue. As long as the Portlet 3.0 TCK tests don't suffer any regressions, then the commit that fixes this issue is OK.

        Attachments

          Activity

            People

            • Assignee:
              shuyang.zhou Shuyang Zhou
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
              Recent user:
              Michael Saechang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                40 weeks, 3 days ago

                Packages

                Version Package
                7.1.X
                Master