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

Autogenerated PersistenceImpl files not checking for Empty List

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Inactive
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Trunk CE (grabbed 12/17/2012) with MySQL 5.5 on Tomcat 7.0.34 on Windows 7

      Description

      In JournalStructurePersistenceImpl.java [fetchByG_S()]: line 3857

      It was noticed during debugging that when the item was not found in the cache, the "result" variable was set to an empty list instead of the "null" variable.

      So, the check for "null" to grab from the database was not being executed.
      to correct this, the code should be changed from:

      if (result == null) {

      to:
      if ((result == null) || (result.equals(Collections.EMPTY_LIST))){

      in the ServiceBuilder/*.ftl files that autogenerate this and other similar code.

        Attachments

          Activity

            People

            Assignee:
            michael.saechang Michael Saechang
            Reporter:
            james.lefeu James Lefeu (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              6 years, 18 weeks, 4 days ago

                Packages

                Version Package