smolnar82 commented on code in PR #1135:
URL: https://github.com/apache/knox/pull/1135#discussion_r2666045096
##########
gateway-i18n-logging-log4j/src/main/java/org/apache/knox/gateway/i18n/messages/loggers/log4j/Log4jMessageLogger.java:
##########
@@ -42,15 +42,14 @@ public final void log( final StackTraceElement caller,
final MessageLevel messag
}
private static Level toLevel(final MessageLevel level ) {
- switch( level ) {
- case FATAL: return Level.FATAL;
- case ERROR: return Level.ERROR;
- case WARN: return Level.WARN;
- case INFO: return Level.INFO;
- case DEBUG: return Level.DEBUG;
- case TRACE: return Level.TRACE;
- default: return Level.OFF;
Review Comment:
```
public enum MessageLevel {
FATAL, ERROR, WARN, INFO, DEBUG, TRACE
}
```
All cases are handled, no need for the 'default' case (even PMD marks it as
redundant).
--
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]