[ https://issues.apache.org/jira/browse/ISIS-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Minto van der Sluis updated ISIS-256: ------------------------------------- Comment: was deleted (was: Debugging revealed the PojoAdapter.checkLock() was called with otherVersion = null. This resulted in checkLoch() throwing a ConcurrencyException. Adding a check on the value of otherVersion solved my problem. Actually instead of the changed if statement I preferred the following: if (otherVersion != null && otherVersion.different(version)) { .... This however resulted in failing unit test. In my opinion a sign that the unit tests are coupled too tightly to the implementation of the method. ) > NullPointerReference exceptions when attempting to persist an object > -------------------------------------------------------------------- > > Key: ISIS-256 > URL: https://issues.apache.org/jira/browse/ISIS-256 > Project: Isis > Issue Type: Bug > Components: Viewer: RestfulObjects > Affects Versions: 0.2.0-incubating, 0.3.1-incubating > Reporter: Barry Woods > Assignee: Dan Haywood > Labels: patch > Fix For: 0.3.1-incubating > > Attachments: DomainResourceHelper.java > > Original Estimate: 2h > Remaining Estimate: 2h > > NullPointerReference exceptions when attempting to persist an object. This > occurs under two scenarios: > 1. Omitting the json for a field annotated as @Optional in the pojo > 2. Attempting to persist an object that has getter only fields -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira