Skip to content

Commit

Permalink
chore: log statements optimization #2672
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomer2001 committed Oct 19, 2022
1 parent 0b8f4cc commit 5a45575
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ public Object callAction(Object instance, String className, String methodName, O
throw new InstantiationException(msg);
}

logger.debug("Constructor found: {}", constr.toGenericString());
if (logger.isDebugEnabled()) {
logger.debug("Constructor found: {}", constr.toGenericString());
}
Object[] args = getArgsForCall(constr, arity, rhinoArgs);

logger.debug("Creating an instance");
Expand All @@ -128,7 +130,9 @@ public Object callAction(Object instance, String className, String methodName, O
throw new NoSuchMethodException(msg);
}

logger.debug("Method found: {}", javaMethod.toGenericString());
if (logger.isDebugEnabled()) {
logger.debug("Method found: {}", javaMethod.toGenericString());
}
Object[] args = getArgsForCall(javaMethod, arity, rhinoArgs);

logger.debug("Performing method call");
Expand Down

0 comments on commit 5a45575

Please sign in to comment.