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

GroupFinderImpl has several code smells that affects quality of Liferay's public API.

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 6.2.0 CE GA1, 6.2.10 EE GA1, 6.2.X EE, 7.0.0 M3, 7.0.0 Alpha 2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      All environments.
    • Fix Priority:
      2

      Description

      GroupFinderImpl has several code smells that affects quality of our public API.

      Example:

      GroupLocalServiceUtil.search(long companyId, LinkedHashMap<Object> params, int start, int end);
      

      and

      GroupLocalServiceUtil.searchCount(long companyId, long parentGroupId, String keywords,
      LinkedHashMap<String, Object> params)
      

      and

      GroupFinder.countByC_C_PG_N_D(
      			Session session, long companyId, long[] classNameIds,
      			long parentGroupId, String parentGroupIdComparator, String[] names,
      			String[] descriptions, LinkedHashMap<String, Object> params,
      			boolean andOperator)
      

      and

      GroupFinder.findByC_C_PG_N_D(long companyId, long[] classNameIds, long parentGroupId, String[] names,
      		String[] descriptions, LinkedHashMap<String, Object> params,
      		boolean andOperator, int start, int end, OrderByComparator<Group> obc)
      

      1. Has LinkedHashMap requires parameters on certain order! It is wrong to expect the user of the API to expect this.
      2. The parameter is LinkedHashMap not a Map. It would be good to change that to a Map.

        Attachments

          Activity

            People

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

              Dates

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

                Packages

                Version Package