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

NullModel should always return same object

    Details

      Description

      We depend on Ehcache to support our cache API, and Ehcache can be configured to do replication to other jvm or to disk, which will serialize/deserialize keys and values.

      NullModel is a placeholder for null model which can be stored into our cache. When we serialize it and deserialize it later, it should always return same object.

      Reproduce steps:

      Run unit test EntityCacheImplTest (This test is added in the fix of this issue)

      Before fix, the test failed and error log like:

      java.lang.AssertionError: expected same:<com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl$NullModel@2ce68e68> was not:<com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl$NullModel@77a4105>

       

      After fix, the test passed.

       

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              tina.tian Tina Tian
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.0.0 DXP FP23
                7.0.X EE
                7.0.4 CE GA5
                7.1.X
                Master