You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/09/20 20:12:14 UTC
svn commit: r1388149 -
/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapter/PojoAdapter.java
Author: danhaywood
Date: Thu Sep 20 18:12:14 2012
New Revision: 1388149
URL: http://svn.apache.org/viewvc?rev=1388149&view=rev
Log:
ISIS-265: applying patch
Modified:
incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapter/PojoAdapter.java
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapter/PojoAdapter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapter/PojoAdapter.java?rev=1388149&r1=1388148&r2=1388149&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapter/PojoAdapter.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapter/PojoAdapter.java Thu Sep 20 18:12:14 2012
@@ -22,8 +22,6 @@ package org.apache.isis.runtimes.dflt.ru
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
-import org.apache.log4j.Logger;
-
import org.apache.isis.applib.profiles.Localization;
import org.apache.isis.core.commons.authentication.AuthenticationSession;
import org.apache.isis.core.commons.ensure.Assert;
@@ -46,9 +44,9 @@ import org.apache.isis.core.metamodel.sp
import org.apache.isis.core.metamodel.spec.ObjectSpecification;
import org.apache.isis.core.metamodel.spec.Specification;
import org.apache.isis.core.metamodel.spec.SpecificationLoader;
-import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
+import org.apache.log4j.Logger;
public class PojoAdapter extends InstanceAbstract implements ObjectAdapter {
@@ -332,7 +330,7 @@ public class PojoAdapter extends Instanc
return;
}
final Version version = getOid().getVersion();
- if (version != null && version.different(otherVersion)) {
+ if (otherVersion != null && version != null && version.different(otherVersion)) {
LOG.info("concurrency conflict on " + this + " (" + otherVersion + ")");
throw new ConcurrencyException(getAuthenticationSession().getUserName(), getOid(), version, otherVersion);
}