Skip to content

Commit

Permalink
Check if logLevelObj is instance of Number instead of Long (#7955)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrucken authored Feb 4, 2025
1 parent be7e1ef commit 9566974
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ public ShellMsg readShellMsg() throws IOException, NoOutputException {

if (command.equals("log")) {
Object logLevelObj = msg.get("level");
if (logLevelObj != null && logLevelObj instanceof Long) {
long logLevel = (Long) logLevelObj;
shellMsg.setLogLevel((int) logLevel);
if (logLevelObj != null && logLevelObj instanceof Number) {
int logLevel = ((Number) logLevelObj).intValue();
shellMsg.setLogLevel(logLevel);
}
}

Expand Down

0 comments on commit 9566974

Please sign in to comment.