Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-22709

Possible NPE in GradebookServiceHibernateImpl

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.2, 2.9.0
    • Fix Version/s: 10.0
    • Component/s: edu-services
    • Labels:
      None

      Description

      Seen when calling code in a custom entityProvider:

      2012-10-02 14:52:20,614 INFO TP-Processor3 za.ac.uct.cet.sakai.gradebook.entityproviders.GradebookEntityProvider - entityExists(fe7927a0-ae7b-416a-adea-f6ceb5640e62)
      java.lang.NullPointerException
      at org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl.fixingPointsEarned(GradebookServiceHibernateImpl.java:2136)
      at org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl.getTotalPointsEarnedInternalFixing(GradebookServiceHibernateImpl.java:2036)
      at org.sakaiprojec

      In edu-services 1.1.6 (2.8.2) though code analysis shows its still present in trunk and 2.9

      if(gradeMap != null)
      {
      Double rightPercent = gradeMap.getValue(letterGrade);
      BigDecimal rightPercentBD = new BigDecimal(rightPercent);

      If gradeMap.getValue(letterGrade); returns null this will NPE

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                dhorwitz David Horwitz
                Reporter:
                dhorwitz David Horwitz
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code