Issue Details (XML | Word | Printable)

Key: NUCJPA-259
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Oliver Gierke
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus API JPA

FromImpl must not return null for getJoins()

Created: 16/Dec/13 10:49 AM   Updated: 22/Dec/13 04:19 PM   Resolved: 16/Dec/13 11:04 AM
Component/s: None
Affects Version/s: 3.3.4
Fix Version/s: 3.3.6


 Description  « Hide
If {{getJoins()}} is called on {{FromImpl}} without a join being present, you're not getting back an empty {{Set}} as one would expect, but {{null}}. This causes {{NullPointerExceptions}} in case you're directly iterating over the result (e.g. in a foreach-loop). Generally speaking, methods with a collection return type should never return null but empty collections.

Andy Jefferson added a comment - 16/Dec/13 11:04 AM
Fixes in GitHub master for getJoins() and also getFetches()

Andy Jefferson made changes - 16/Dec/13 11:04 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.3.6 [ 12060 ]
Resolution Fixed [ 1 ]
Oliver Gierke added a comment - 16/Dec/13 11:32 AM
Wow, that was fast! :) Any estimated release date for 3.3.6, so that I can report back on StackOverflow?

Andy Jefferson added a comment - 16/Dec/13 11:47 AM
No release date yet, but SO user could just grab it from DN nightly builds at

Andy Jefferson made changes - 22/Dec/13 04:19 PM
Status Resolved [ 5 ] Closed [ 6 ]