jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r927900 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
Date Fri, 26 Mar 2010 15:05:26 GMT
Author: jukka
Date: Fri Mar 26 15:05:26 2010
New Revision: 927900

URL: http://svn.apache.org/viewvc?rev=927900&view=rev
Log:
JCR-2586: Missing synchronization in InternalVersionHistoryImpl

Also synchronize relevant parts of InternalVersionImpl (thanks, Toby!)

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java?rev=927900&r1=927899&r2=927900&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
Fri Mar 26 15:05:26 2010
@@ -244,7 +244,7 @@ class InternalVersionImpl extends Intern
     /**
      * Clear the list of predecessors/successors and the label cache.
      */
-    void clear() {
+    synchronized void clear() {
         labelCache = null;
     }
 
@@ -367,7 +367,7 @@ class InternalVersionImpl extends Intern
      * @param label label to add
      * @return <code>true</code> if the label was added
      */
-    boolean internalAddLabel(Name label) {
+    synchronized boolean internalAddLabel(Name label) {
         if (labelCache == null) {
             labelCache = new HashSet<Name>();
         }
@@ -380,7 +380,7 @@ class InternalVersionImpl extends Intern
      * @param label label to remove
      * @return <code>true</code> if the label was removed
      */
-    boolean internalRemoveLabel(Name label) {
+    synchronized boolean internalRemoveLabel(Name label) {
         return labelCache != null && labelCache.remove(label);
     }
 
@@ -390,7 +390,7 @@ class InternalVersionImpl extends Intern
      * @param label label to check
      * @return <code>true</code> if the label exists
      */
-    boolean internalHasLabel(Name label) {
+    synchronized boolean internalHasLabel(Name label) {
         return labelCache != null && labelCache.contains(label);
     }
 
@@ -399,7 +399,7 @@ class InternalVersionImpl extends Intern
      *
      * @return the internal labels
      */
-    Name[] internalGetLabels() {
+    synchronized Name[] internalGetLabels() {
         if (labelCache == null) {
             return new Name[0];
         } else {



Mime
View raw message