ppkarwasz commented on code in PR #4014:
URL: https://github.com/apache/logging-log4j2/pull/4014#discussion_r2649783213


##########
log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java:
##########
@@ -268,6 +267,12 @@ static void formatMessage(
         }
     }
 
+    private static boolean ignoreLastArgument(final Object[] args, final int 
argCount) {

Review Comment:
   _Nit_: naming is hard, but I think `isLastArgumentThrowable` would better 
reflect its purpose.
   
   Alternatively the following logic could be refactored into a 
`getArgCountWithoutException` method:
   
   ```java
   argCount < 1 ? 0 : argCount - (ignoreLastArgument(args, argCount) ? 1 : 0)
   ```



-- 
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]

Reply via email to