[ 
https://issues.apache.org/jira/browse/GORA-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14193151#comment-14193151
 ] 

Hudson commented on GORA-389:
-----------------------------

SUCCESS: Integrated in gora-trunk #1289 (See 
[https://builds.apache.org/job/gora-trunk/1289/])
GORA-389: Document or List mapping change cause NPE in clearDirty() (drazzib: 
rev f267370f1bb3a3bc3c69550be8c2d9d7d33affc7)
* gora-mongodb/src/test/java/org/apache/gora/mongodb/store/TestMongoStore.java
* gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStore.java
* gora-mongodb/src/main/java/org/apache/gora/mongodb/query/MongoDBResult.java


> MongoStore: Document or List mapping change cause NPE in clearDirty()
> ---------------------------------------------------------------------
>
>                 Key: GORA-389
>                 URL: https://issues.apache.org/jira/browse/GORA-389
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: gora-mongodb
>    Affects Versions: 0.5
>            Reporter: Damien Raude-Morvan
>             Fix For: 0.6
>
>
> I've found an issue in current implementation of MongoStore on [Document or 
> List|http://gora.apache.org/current/gora-mongodb.html] mapping type handling.
> If your schema contains a field like this :
> {noformat}
> { "name": "keywords",
>    "type": { "type": "array", "items": "string"},
>    "default": null
> }
> {noformat}
> If you choose to latter defaults to an empty array instead of null value like 
> this
> {noformat}
> { "name": "keywords",
>    "type": { "type": "array", "items": "string"},
>    "default": []
> }
> {noformat}
> loading old data will fail because of clearDirty method will try to also 
> clear a null object.
> {code}
> persistent.clearDirty();
> {code}
> I implemented and tested a fix which always return a DirtyListWrapper or 
> DirtyMapWrapper instead of previous null value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to