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

UserLocalServiceImpl#getDefaultUser() isn't MVCC aware

    Details

      Description

      StateObjectStateException is reproducible with the following test case. (It will be added to CompanyLocalServiceTest in the 1st commit of my PR)

      public void testUpdateDisplay() throws Exception {
      	Company company = addCompany();
      
      	long companyId = company.getCompanyId();
      
      	User user = UserLocalServiceUtil.getDefaultUser(companyId);
      
      	user.setFirstName(StringUtil.randomString());
      
      	UserLocalServiceUtil.updateUser(user);
      
      	CompanyLocalServiceUtil.updateDisplay(companyId, "hu", "CET");
      
      	user = UserLocalServiceUtil.getDefaultUser(companyId);
      
      	Assert.assertEquals("hu", user.getLanguageId());
      	Assert.assertEquals("CET", user.getTimeZoneId());
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 48 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M1