[Building Sakai] Strange Gradebook 2 Behavior with Java 7

Earle Nietzel earle.nietzel at gmail.com
Sat Aug 4 06:58:40 PDT 2012


It looks as though the incompatibilities that sakai has up to this
point suffered from are:
(If anyone is aware of others please list them)

--
Synopsis: Order of Methods returned by Class.get Methods can Vary
Description: In JDK 7, build 129, the following reflective operations
in java.lang.Class changed the fixed order in which they return the
methods and constructors of a class:
getMethods
getDeclaredMethods
getDeclaredConstructors
This may cause issues for code that assumes (contrary to the
specification) a particular order for methods or constructors.
--
Synopsis: Updated sort behavior for Arrays and Collections may throw
an IllegalArgumentException
Description: The sorting algorithm used by java.util.Arrays.sort and
(indirectly) by java.util.Collections.sort has been replaced. The new
sort implementation may throw an IllegalArgumentException if it
detects a Comparable that violates the Comparable contract. The
previous implementation silently ignored such a situation.
If the previous behavior is desired, you can use the new system
property, java.util.Arrays.useLegacyMergeSort, to restore previous
mergesort behavior.
--

The first one has mostly affected JUnit tests since some unit tests
were depending on the tests to be executed in the order they appeared
in the class. The glaring offenders have been fixed.

As for the second these should probably be considered bugs as previous
JDK's would also give unexpected results, It would be nice to not have
to depend on the use of java.util.Arrays.useLegacyMergeSort.

Earle

On Fri, Aug 3, 2012 at 1:39 PM, Thomas Amsler <tpamsler at ucdavis.edu> wrote:
> Michael,
>
> Thank you very much for reporting this. It looks like there are some
> incompatibilities between JDK 6 and JDK 7 as listed here:
>
> http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#jdk7
>
> Folks that are using JDK 7 may want to read up on this. The Gradebook2
> specific case is documented here:
>
> https://jira.sakaiproject.org/browse/GRBK-1336
>
> Also the gradebook core tool may be affected by this if they haven't changed:
>
> org.sakaiproject.service.gradebook.shared.GradebookService.lettergradeComparator
>
>
> Best,
> -- Thomas
>
> On Fri, Aug 3, 2012 at 9:07 AM, Stoufer,R M <kc4uf at ufl.edu> wrote:
>> Hi Thomas,
>>
>> JIRA ticket is created...  GRBK-1336
>>
>> Thanks!
>> Michael
>>
>> -----Original Message-----
>> From: Thomas Amsler [mailto:tpamsler at ucdavis.edu]
>> Sent: Friday, August 03, 2012 11:51 AM
>> To: Stoufer,R M
>> Cc: (sakai-dev at collab.sakaiproject.org)
>> Subject: Re: [Building Sakai] Strange Gradebook 2 Behavior with Java 7
>>
>> Michael,
>>
>> Can you please create a gradebook2 JIRA ticket?
>>
>> https://jira.sakaiproject.org/browse/GRBK
>>
>> Best,
>> -- Thomas
>>
>> On Fri, Aug 3, 2012 at 7:03 AM, Stoufer,R M <kc4uf at ufl.edu> wrote:
>>> Hi All,
>>>
>>>
>>>
>>> We are performing functional testing of Sakai 2.8.x using Java 7 u3
>>> and Tomcat 7.0.27.  When we look at the Grade Scale in Gradebook2
>>> v1.7.0 the order of the letter grades changes which throws off the
>>> calculations of the 'To' column.  This appears to be an issue caused
>>> by the use of Java 7.  When Java 6 is used instead the appearance of the Grade Scale is fine.
>>>
>>>
>>>
>>> I have attached images which show how it looks when using each Java version.
>>>
>>>
>>>
>>> Does anyone have an idea of what may be causing this?
>>>
>>>
>>>
>>> Thanks!
>>>
>>>
>>>
>>> Michael Stoufer
>>>
>>> Academic Technology - ICS
>>>
>>> University of Florida
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>
>>> TO UNSUBSCRIBE: send email to
>>> sakai-dev-unsubscribe at collab.sakaiproject.org
>>> with a subject of "unsubscribe"
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"


More information about the sakai-dev mailing list