kaleidos / grails-postgresql-extensions

Grails plugin to use postgresql native elements such as arrays, hstores,...
Apache License 2.0
78 stars 62 forks source link

NullPointerException when Json/Jsonb value is null in database #76

Closed eamon316 closed 8 years ago

eamon316 commented 8 years ago
java.lang.NullPointerException
    at net.kaleidos.hibernate.usertype.JsonMapType.nullSafeGet(JsonMapType.java:50)
    at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:127)

This occurs when a value in Json/Jsonb column is null as ((PGobject)rs.getObject(names[0])) returns null. .getValue() is then called on null value.

I will submit a pull request with updated tests

ilopmar commented 8 years ago

Thank you! Published in 4.6.1