-
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
-
Component/s: Portal Services, Portal Services > Legacy
-
Labels:None
-
Environment:All environments.
-
Fix Priority:2
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.