Ambiguous getter for "category" property of Assignment domain class

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.

Activity

Show:

Seth Theriault December 8, 2009 at 9:20 AM

Per the 2.6.2/2.5.6 Jira Review Meeting held on 2009-12-08, this issue has been rescheduled for a future release and temporarily removed from the 2.5.x merge list pending further review.

Peter Peterson November 16, 2009 at 2:05 PM

Included in Sakai 2.5.6 per Thomas's script

Jean-François Lévêque February 3, 2009 at 2:21 AM

How can the fix be merged into 2.5.x?

Chen Wen February 2, 2009 at 10:13 AM

i think this is resolved in trunk and 2.6. -Chen

Jean-François Lévêque December 19, 2008 at 2:15 AM

2.5.x merge reverted r55430

Fixed

Details

Priority

Affects versions

Components

Assignee

Reporter

Created June 3, 2008 at 10:11 AM
Updated March 27, 2012 at 7:02 AM
Resolved February 2, 2009 at 10:13 AM