Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-17647 Clean up code via static code review sweep for 2.7
  3. SAK-17670

A number of defects found via static code review for rWiki

    Details

    • Type: Sub-task
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.7.0
    • Component/s: Rwiki
    • Labels:
      None
    • Environment:
      Static code review 2.7.0-M2

      Description

      [1] uk.ac.cam.caret.sakai.rwiki.component.macros.SectionsMacro
      If site is null then NPE at line 92 caused by IdUnusedException at line 86

      groups = site.getGroups();

      for (Iterator is = groups.iterator(); is.hasNext()
      {
      Group group = (Group) is.next();
      String pageName = ""; //$NON-NLS-1$

      if ("true".equals(useids)) //$NON-NLS-1$

      { pageName = group.getId() + "/Home"; //$NON-NLS-1$ }

      else
      {
      if (site != null)

      [2] uk.ac.cam.caret.sakai.rwiki.component.model.impl.SQLScriptMigration
      Need to close InputStreamReader Line 86
      BufferedReader br = new BufferedReader(new InputStreamReader(inStream));

      [3] uk.ac.cam.caret.sakai.rwiki.component.service.impl.BaseFOPSerializer
      Fail to clean up InputStream Line 136 --> getClass().getResourceAsStream(configfile)
      Configuration cfg = cfgBuild.build(getClass().getResourceAsStream(configfile));

      [4]uk.ac.cam.caret.sakai.rwiki.tool.bean.RecentlyVisitedBean
      Line 215
      if realm == null and castOther.realm exists then NPE

      if ((realm == null && castOther.realm == null)

      realm.equals(castOther.realm))

      [5] uk.ac.cam.caret.sakai.rwiki.tool.bean.RecentlyVisitedBean
      NPE 212 as well

      if ((search == null && castOther.search == null)

      search.equals(castOther.searc

      [6] uk.ac.cam.caret.sakai.rwiki.component.service.impl.BaseFOPSerializer
      Never used Line 167

      String headers = "Content-type: "
      + resource.getContentType()
      + "\nContent-length: "
      + resource.getContentLength()
      + "\n\n";

      [7] uk.ac.cam.caret.sakai.rwiki.component.service.impl.RWikiEntityContentProducer
      Never used Line 263
      List l = new ArrayList();

      [8] uk.ac.cam.caret.sakai.rwiki.component.service.impl
      Never used line 164
      AttributesImpl propA = new AttributesImpl();
      AttributesImpl propA = new AttributesImpl();

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration