Bug #172

Potential NullPointerException in Parameters.getSort()

Added by Oliver Gierke 8 months ago. Updated 8 months ago.

Status:Closed Start:12/08/2009
Priority:High Due date:
Assigned to:Oliver Gierke % Done:

100%

Category:Core DAO Spent time: -
Target version:1.1 Estimated time:0.50 hour

Description

The getSort() method of the Parameters class calls getPageable() and triggers getSort() on the result immediately although getPageable() might return null. The hasPageableParameter() check is somewhat misleading as it only checks whether the method signature contains a Pageable parameter. Even if this is true this does not necessarily mean, that on calling the method the parameter cannot be null.

mylyn-context.zip (181.4 KB) Oliver Gierke, 12/08/2009 05:27 pm

Associated revisions

Revision 8251
Added by Oliver Gierke 8 months ago

  • fixes #172 - NullPointerException when null is provided as Pageable in query methods
  • added null checks and updated Javadoc to explain semantics of the getters more clearly

History

Updated by Oliver Gierke 8 months ago

  • Status changed from New to In progress

Updated by Oliver Gierke 8 months ago

Updated by Oliver Gierke 8 months ago

  • Status changed from In progress to Fixed
  • % Done changed from 0 to 100

Applied in changeset r8251.

Updated by Oliver Gierke 8 months ago

  • Status changed from Fixed to Closed

Also available in: Atom PDF