Return-Path: X-Original-To: apmail-gora-dev-archive@www.apache.org Delivered-To: apmail-gora-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D85A31012C for ; Wed, 14 Jan 2015 22:17:33 +0000 (UTC) Received: (qmail 86688 invoked by uid 500); 14 Jan 2015 22:17:35 -0000 Delivered-To: apmail-gora-dev-archive@gora.apache.org Received: (qmail 86651 invoked by uid 500); 14 Jan 2015 22:17:35 -0000 Mailing-List: contact dev-help@gora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@gora.apache.org Delivered-To: mailing list dev@gora.apache.org Received: (qmail 86380 invoked by uid 99); 14 Jan 2015 22:17:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jan 2015 22:17:35 +0000 Date: Wed, 14 Jan 2015 22:17:35 +0000 (UTC) From: "Hudson (JIRA)" To: dev@gora.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GORA-389) MongoStore: Document or List mapping change cause NPE in clearDirty() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GORA-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14277787#comment-14277787 ] Hudson commented on GORA-389: ----------------------------- SUCCESS: Integrated in gora-trunk #1366 (See [https://builds.apache.org/job/gora-trunk/1366/]) Update CHANGES.txt for GORA-389. (drazzib: rev 2b48955ffb4008392ca96502401cb2b944892d1d) * CHANGES.txt > 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 > Assignee: 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)