jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1522550 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/Descriptors.java
Date Thu, 12 Sep 2013 12:37:37 GMT
Author: chetanm
Date: Thu Sep 12 12:37:37 2013
New Revision: 1522550

URL: http://svn.apache.org/r1522550
Log:
OAK-1014 - Allow customization of repository descriptors

Making the Descriptors state mutable. This is required as some descriptor value might change
later with time

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/Descriptors.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/Descriptors.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/Descriptors.java?rev=1522550&r1=1522549&r2=1522550&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/Descriptors.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/repository/Descriptors.java
Thu Sep 12 12:37:37 2013
@@ -21,9 +21,9 @@ package org.apache.jackrabbit.oak.jcr.re
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.jcr.PropertyType;
 import javax.jcr.Repository;
@@ -88,7 +88,7 @@ public class Descriptors {
 
     @SuppressWarnings("deprecation")
     public Descriptors(ValueFactory valueFactory) {
-        descriptors = new HashMap<String, Descriptor>();
+        descriptors = new ConcurrentHashMap<String, Descriptor>();
         Value trueValue = valueFactory.createValue(true);
         Value falseValue = valueFactory.createValue(false);
 
@@ -325,7 +325,7 @@ public class Descriptors {
 
     //------------------------------------------< private >---
 
-    private void put(Descriptor descriptor) {
+    public void put(Descriptor descriptor) {
         descriptors.put(descriptor.name, descriptor);
     }
 



Mime
View raw message