Qi4j

Having null values in collections causes JSONEntityState to throw exception

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.1
  • Component/s: Core Runtime
  • Labels:
    None

Description

Currently the JSONEntityState throws JSONException if there is a null value
in some collection property. It seems that the problem is in
org.qi4j.runtime.types.CollectionType . Replacing line 108 from

Object value = array.get( i );

to

Object value = array.opt( i );

fixed the problem.

Activity

Hide
Niclas Hedhman added a comment -

Fixed.

Show
Niclas Hedhman added a comment - Fixed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: