kwin commented on code in PR #1352:
URL: https://github.com/apache/jackrabbit-oak/pull/1352#discussion_r1521461105


##########
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexProviderService.java:
##########
@@ -368,13 +349,19 @@ public class LuceneIndexProviderService {
     private PropertyIndexCleaner cleaner;
     private AsyncIndexesSizeStatsUpdate asyncIndexesSizeStatsUpdate;
 
+    private boolean enableCopyOnRead = true;
+    private boolean enableCopyOnWrite = true;
+
     @Activate
-    private void activate(BundleContext bundleContext, Map<String, ?> config) 
throws IOException {
+    private void activate(BundleContext bundleContext, ComponentContext 
componentContext, Configuration config) throws IOException {
+        Dictionary<String, Object> properties = 
componentContext.getProperties();
+        enableCopyOnRead = 
PropertiesUtil.toBoolean(properties.get("enableCopyOnReadSupport"), true);
+        enableCopyOnWrite = 
PropertiesUtil.toBoolean(properties.get("enableCopyOnWriteSupport"), true);
         asyncIndexesSizeStatsUpdate = new AsyncIndexesSizeStatsUpdateImpl(
-                
PropertiesUtil.toLong(config.get(LUCENE_INDEX_STATS_UPDATE_INTERVAL),
-                        LUCENE_INDEX_STATS_UPDATE_INTERVAL_DEFAULT) * 1000); 
// convert seconds to millis
-        boolean disabled = PropertiesUtil.toBoolean(config.get(PROP_DISABLED), 
PROP_DISABLED_DEFAULT);
-        hybridIndex = 
PropertiesUtil.toBoolean(config.get(PROP_HYBRID_INDEXING), 
PROP_DISABLED_DEFAULT);
+                PropertiesUtil.toLong(config.luceneIndexStatsUpdateInterval(),
+                        PROP_LUCENE_INDEX_STATS_UPDATE_INTERVAL_DEFAULT) * 
1000); // convert seconds to millis
+        boolean disabled = PropertiesUtil.toBoolean(config.disabled(), 
PROP_DISABLED_DEFAULT);

Review Comment:
   There is no need for a type conversion here. Also the default is always set 
according to what is defined in the component property type 
(https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-component.property.types)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to