reschke commented on code in PR #2947:
URL: https://github.com/apache/jackrabbit-oak/pull/2947#discussion_r3403376326


##########
oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/toggle/Feature.java:
##########
@@ -60,7 +70,10 @@ private Feature(AtomicBoolean value, Registration 
registration) {
      * @return the feature toggle.
      */
     public static Feature newFeature(String name, Whiteboard whiteboard) {
-        AtomicBoolean value = new AtomicBoolean();
+        // by default the initial value is false, but it can be overridden by 
a system property
+        AtomicBoolean value = new AtomicBoolean(
+                SystemPropertySupplier.create("oak-feature." + name, false).

Review Comment:
   That's why I waited for your feedback :-)
   
   Hmmm. The initial idea was to make this consistent.
   
   Would it be ok to let the code creating the toggle to opt-in using a 
parameter in `newFeature`? That way, existing code would remain unaffected. 
OTOH, letting the FT to be defaulted from a system property would be made 
consistent in naming and behavior.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to