Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-19081 2.8 Static code review sweep
  3. SAK-18478

Review the use of byte[] and its impact on Sakai for 2.8

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: CLOSED
    • Priority: Major
    • Resolution: No Resources
    • Affects Version/s: 2.8.0
    • Fix Version/s: None
    • Component/s: Global
    • Labels:
      None
    • Environment:
      Code review

      Description

      Unbound use of byte[] may cause performance or memory management issues for Sakai under unexpected bahaviour of the end user.

      Grepping on byte[] in the 2.7.x code base discovers some suspicious unbound allocation of memory.

      For example
      assignment/assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java

      getGradesSpreadSheet

      // output
      Blob b = new Blob();
      try

      { wb.write(b.outputStream()); }

      catch (IOException e)

      { M_log.warn(this + " getGradesSpreadsheet Can not output the grade spread sheet for reference= " + ref); }

      return b.getBytes();
      }

      It is too late in the 2.7.0 release cycle to review so am setting as a task for 2.7.1. Assigning to self, but will hopefully have the support of the MT.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                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