incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r948933 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
Date Thu, 27 May 2010 17:55:38 GMT
Author: cziegeler
Date: Thu May 27 17:55:38 2010
New Revision: 948933

URL: http://svn.apache.org/viewvc?rev=948933&view=rev
Log:
Synchronize method to avoid unwanted exceptions

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java?rev=948933&r1=948932&r2=948933&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
Thu May 27 17:55:38 2010
@@ -710,10 +710,10 @@ public class JcrResourceResolver
         return rootProvider.getSession();
     }
 
-    /** We don't need to synchronize this method as a resource resolver
-     * is expected to be used by a single session (like the underlying session).
+    /**
+     * Get a resolver for the workspace.
      */
-    private ResourceResolver getResolverForWorkspace(final String workspaceName) throws LoginException
{
+    private synchronized ResourceResolver getResolverForWorkspace(final String workspaceName)
throws LoginException {
         if ( createdResolvers == null ) {
             createdResolvers = new HashMap<String,ResourceResolver>();
         }



Mime
View raw message