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

Ambiguous getter for "category" property of Assignment domain class

    XMLWordPrintable

    Details

      Description

      In rev 27891 of the Gradebook, a "category" property (with "setCategory(Category)" and "getCategory()" methods) was added to the Assignment object. The Hibernate mapping uses it as a foreign key to the Category table.

      In rev 29400, a boolean method named "isCategory()" was added to Assignment, CourseGrade, and their superclass GradableObject. In all cases, the method always returns "false".

      The "isCategory" may have been left over from some earlier idea for implementing assignment categories. However, it doesn't serve any purpose currently, and it introduces a destructive bug: Spring + Hibernate will sometimes rightly try to map a category field to "getCategory()" (expecting a Category object), but will sometimes wrongly map it to "isCategory()" (expecting a boolean value).

      I'm marking this as critical due to the difficulty of debugging the error when it occurs.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                cwen@iupui.edu Chen Wen (Inactive)
                Reporter:
                raydavis Ray Davis (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code