incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1388149 - /incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapter/PojoAdapter.java
Date Thu, 20 Sep 2012 18:12:14 GMT
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);
         }



Mime
View raw message