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


##########
oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/toggle/Feature.java:
##########
@@ -34,12 +37,20 @@
  * involves registering a feature toggle on the {@link Whiteboard} and
  * potentially comes with some overhead (e.g. when the whiteboard is based on
  * OSGi). Therefore, client code should not create a new feature, check the
- * state and then immediately release/close it again. Instead a feature should
+ * state and then immediately release/close it again. Instead, a feature should
  * be acquired initially, checked at runtime whenever needed and finally
  * released when the client component is destroyed.
+ * <p>
+ * The default state of {@code false} can be overridden by a system property
+ * using {@linkplain #newFeatureWithSystemPropertyDefault(String, Whiteboard)},
+ * in which case The property name is derived from the toggle name. This helps 
to quickly verify

Review Comment:
   Small Javadoc nit: in "in which case The property name is derived from the 
toggle name", **The** should be lowercase **the** so the sentence reads 
naturally.



##########
oak-core-spi/src/test/java/org/apache/jackrabbit/oak/spi/toggle/FeatureToggleTest.java:
##########
@@ -50,6 +51,28 @@ public void disabledByDefault() {
         }
     }
 
+    @Test

Review Comment:
   Optional: `defaultOverriddenAsTrue` / `defaultOverriddenAsFalse` cover 
boolean overrides, but not a malformed `oak-feature.*` value. If 
`SystemPropertySupplier` logs and falls back on non-boolean input, a test 
asserting the expected default (likely `false`) would lock that behavior in.



-- 
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