jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r633847 - in /jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: ItemImpl.java state/ItemState.java
Date Wed, 05 Mar 2008 13:54:08 GMT
Author: jukka
Date: Wed Mar  5 05:53:55 2008
New Revision: 633847

URL: http://svn.apache.org/viewvc?rev=633847&view=rev
Log:
1.4: Merged revision 632376 (JCR-1359)

Modified:
    jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
    jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java?rev=633847&r1=633846&r2=633847&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
Wed Mar  5 05:53:55 2008
@@ -1185,11 +1185,17 @@
                     while (depIt.hasNext()) {
                         NodeId id = (NodeId) depIt.next();
                         if (!affectedIds.contains(id)) {
-                            // need to save dependency as well
-                            String msg = itemMgr.safeGetJCRPath(id)
-                                    + " needs to be saved as well.";
-                            log.debug(msg);
-                            throw new ConstraintViolationException(msg);
+                            // JCR-1359 workaround: check whether unresolved
+                            // dependencies originate from 'this' session;
+                            // otherwise ignore them
+                            if (stateMgr.hasTransientItemState(id)
+                                    || stateMgr.hasTransientItemStateInAttic(id)) {
+                                // need to save dependency as well
+                                String msg = itemMgr.safeGetJCRPath(id)
+                                        + " needs to be saved as well.";
+                                log.debug(msg);
+                                throw new ConstraintViolationException(msg);
+                            }
                         }
                     }
                 }

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java?rev=633847&r1=633846&r2=633847&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java
Wed Mar  5 05:53:55 2008
@@ -157,7 +157,7 @@
     /**
      * Pull state information from overlayed state.
      */
-    void pull() {
+    synchronized void pull() {
         ItemState state = overlayedState;
         if (state != null) {
             // sync modification count



Mime
View raw message