rishabhdaim commented on code in PR #3003:
URL: https://github.com/apache/jackrabbit-oak/pull/3003#discussion_r3538676198
##########
oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/properties/SystemPropertySupplier.java:
##########
@@ -100,18 +109,10 @@ public SystemPropertySupplier<T>
formatSetMessage(@NotNull BiFunction<String, T,
* Specify logging level to use for "success" message (defaults to "INFO")
*/
public SystemPropertySupplier<T> logSuccessAs(String successLogLevel) {
- String newLevel;
- switch (Objects.requireNonNull(successLogLevel)) {
- case "DEBUG":
- case "ERROR":
- case "INFO":
- case "TRACE":
- case "WARN":
- newLevel = successLogLevel;
- break;
- default:
- throw new IllegalArgumentException("unsupported log level: " +
successLogLevel);
- }
+ String newLevel = switch (Objects.requireNonNull(successLogLevel)) {
+ case "DEBUG", "ERROR", "INFO", "TRACE", "WARN" -> successLogLevel;
+ default -> throw new IllegalArgumentException("unsupported log
level: " + successLogLevel);
Review Comment:
In https://github.com/apache/jackrabbit-oak/pull/2995, we are removing this
exception, so I would avoid changing this method.
--
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]