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

Allow AssignmentEntity to be more flexible during initialization

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 19.0 [Tentative]
    • Fix Version/s: 12.2, 19.0 [Tentative]
    • Component/s: Assignments
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide
      • Create an assignment
        • where it is linked to gradebook
      • Assign grades and release
      • Student visits site and enters Gradebook Classic

      (this issue was not reliably reproducible)

       

      Show
      Create an assignment where it is linked to gradebook Assign grades and release Student visits site and enters Gradebook Classic (this issue was not reliably reproducible)  

      Description

      AssignmentEntity would throw RuntimeException during initialization which means calling methods would need to handle.

      So instead of throwing an exception when initialization failed,  it can now return null values which will need to be handled by its callers but it is less noisy. Also a warning is logged when initialization fails.

      Address's this stack trace:

      Caused by: java.lang.NullPointerException
      	at org.sakaiproject.assignment.api.AssignmentEntity.initEntity(AssignmentEntity.java:73)
      	at org.sakaiproject.assignment.impl.AssignmentServiceImpl.createAssignmentEntity(AssignmentServiceImpl.java:379)
      	at sun.reflect.GeneratedMethodAccessor3609.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      	at 

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ern Earle R Nietzel
                Reporter:
                ern Earle R Nietzel
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code