jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r636750 - in /jackrabbit/branches/1.4/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java test/java/org/apache/jackrabbit/core/ConcurrentVersioningWithTransactionsTest.java
Date Thu, 13 Mar 2008 13:00:48 GMT
Author: jukka
Date: Thu Mar 13 06:00:47 2008
New Revision: 636750

URL: http://svn.apache.org/viewvc?rev=636750&view=rev
Log:
1.4: Merged revisions 633405 and 633834 (JCR-1275)

Modified:
    jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
    jackrabbit/branches/1.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentVersioningWithTransactionsTest.java

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java?rev=636750&r1=636749&r2=636750&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
Thu Mar 13 06:00:47 2008
@@ -36,6 +36,7 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Value;
+import javax.jcr.InvalidItemStateException;
 import javax.jcr.version.VersionException;
 import javax.jcr.version.VersionHistory;
 
@@ -308,6 +309,9 @@
                     root.store();
                 }
                 root = root.getNode(name, 1);
+                if (root == null) {
+                    throw new InvalidItemStateException();
+                }
             }
             Name historyNodeName = NameFactoryImpl.getInstance().create(Name.NS_DEFAULT_URI,
uuid);
             if (root.hasNode(historyNodeName)) {

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentVersioningWithTransactionsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentVersioningWithTransactionsTest.java?rev=636750&r1=636749&r2=636750&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentVersioningWithTransactionsTest.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentVersioningWithTransactionsTest.java
Thu Mar 13 06:00:47 2008
@@ -23,6 +23,7 @@
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
+import javax.jcr.InvalidItemStateException;
 import javax.jcr.version.Version;
 import javax.transaction.UserTransaction;
 
@@ -66,6 +67,8 @@
                         n.addMixin(mixVersionable);
                         session.save();
                         utx.commit();
+                    } catch (InvalidItemStateException e) {
+                        // ignore
                     } catch (Exception e) {
                         final Throwable deepCause = getLevel2Cause(e);
                         if (deepCause != null && deepCause instanceof StaleItemStateException)
{



Mime
View raw message