Opened 10 years ago

Closed 10 years ago

#626 closed defect (fixed)

NullPointerException when registering follow-up blood

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: trivial Milestone: Reggie v2.16
Component: net.sf.basedb.reggie Keywords:


This seems to happing if a CASE is linked to at least two SPECIMENT or NOSPECIMEN items and at least one of them has a missing sampling date.

It is probably a rare situation that is probably only ever going to occur when testing because then it is more likely to not fill in all information.

	at java.util.Date.getMillisOf(Unknown Source)
	at java.util.Date.compareTo(Unknown Source)
	at java.util.Date.compareTo(Unknown Source)
	at java.util.ComparableTimSort.countRunAndMakeAscending(Unknown Source)
	at java.util.ComparableTimSort.sort(Unknown Source)
	at java.util.ComparableTimSort.sort(Unknown Source)
	at java.util.Arrays.sort(Unknown Source)
	at java.util.Collections.sort(Unknown Source)
	at net.sf.basedb.reggie.servlet.BloodFollowUpRegistrationServlet.getCaseOption(
	at net.sf.basedb.reggie.servlet.BloodFollowUpRegistrationServlet.doGet(
	at javax.servlet.http.HttpServlet.service(

The problem is the servlet add all dates (including nulls) to a list and then tries to sort it. The sorting doesn't work with null values.

Change History (1)

comment:1 by Nicklas Nordborg, 10 years ago

Resolution: fixed
Status: newclosed

(In [2634]) Fixes #626: NullPointerException? when registering follow-up blood

Skip null operation dates when adding to the list.

Note: See TracTickets for help on using tickets.