rishabhdaim commented on code in PR #3003:
URL: https://github.com/apache/jackrabbit-oak/pull/3003#discussion_r3538930853
##########
oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/properties/SystemPropertySupplierTest.java:
##########
@@ -137,4 +138,38 @@ public void testUnsupportedType() {
} catch (IllegalArgumentException expected) {
}
}
+
+ @Test
+ public void testCheckNullDefault() {
+ try {
+ assertNull(SystemPropertySupplier.create("foo", Boolean.class).
+ usingSystemPropertyReader((n) -> null).get());
+ } catch (IllegalArgumentException expected) {
Review Comment:
I would re-write this test to use `@Test(expected=....)` pattern rather than
try/catch.
and add `Assert.fail()` after the test so that it does test that exception
is thrown.
--
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]