XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: CLOSED
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.8.0
    • Component/s: edu-services, Providers
    • Labels:
      None
    • Environment:
      Compiled source code

      Description

      1) 8 locations for Inefficient use of KeySet

      This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

      http://javaantipatterns.wordpress.com/2007/11/22/accessing-the-map-values-using-keyset-iterator/

      org.sakaiproject.coursemanagement.impl.CourseManagementServiceFederatedImpl
      Line 697 String role = (String)map.get(courseSetEid);
      Line 717 String role = (String)map.get(courseSetEid);
      Line 737 String role = (String)map.get(sectionEid);

      org.sakaiproject.coursemanagement.impl.provider.CourseManagementGroupProvider
      Line 106 String rrRole = rrUserRoleMap.get(userEid);
      Line 144 String rrRole = rrGroupRoleMap.get(sectionEid);

      CourseOfferingRoleResolver
      Line 134 String coRole = courseOfferingRoles.get(coEid);

      CourseSetRoleResolver
      String 113 csRole = (String)courseSetRoles.get(csEid);

      SectionRoleResolver
      Line 129 groupRoleMap.put(key, convertRole((String)sectionRoles.get(key)));

      2) Lint Please review then remove
      Line 86 CourseOfferingRoleResolver
      if(coMembers != null) {
      }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dhorwitz David Horwitz
                  Reporter:
                  a.m.berg@uva.nl Alan Berg
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code