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

FinderCache doesn't work properly when using null values in a null convertible string column and the return value is an empty list

    Details

    • Fix Priority:
      4

      Description

      After LPS-81028, methods like JournalContentSearchPersistenceImpl.fetchByG_P_L_P_A are fixed when retrieving non empty lists. But if the first time the method is called it returns an empty list it will use null as part of the key to cache:

      if (list.isEmpty()) {
        finderCache.putResult(FINDER_PATH_FETCH_BY_G_P_L_P_A,
           finderArgs, list);
      }

       

      Since the updateImpl uses the empty string to clear the cache, the value is going to stay cached until it expires returning wrong results in successive calls.

       

      This behaviour is going to make that LPS-81038 is still reproducible.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                support-lep@liferay.com SE Support
                Reporter:
                mariano.alvaro Mariano Álvaro
                Participants of an Issue:
                Recent user:
                Preston Crary
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 20 weeks ago

                  Packages

                  Version Package