vy commented on code in PR #3655: URL: https://github.com/apache/logging-log4j2/pull/3655#discussion_r2081700663
########## log4j-core/src/main/java/org/apache/logging/log4j/core/message/ExtendedThreadInformation.java: ########## @@ -174,4 +174,14 @@ private void formatState(final StringBuilder sb, final ThreadInfo info) { break; } } + + private static StackTraceElement getStackTraceElement(final ThreadInfo info) { Review Comment: Could you implement the following changes, please? 1. Rename this method to `getFirstStackTraceElement` 3. Return null on empty stack trace (instead of returning a dummy `StackTraceElement` with a magic value in it) and mark the method with `@Nullable` from JSpecify 4. Update above `case WAITING` and `case TIMED_WAITING` blocks accordingly, e.g., ``` final StackTraceElement element = getFirstStackTraceElement(info); final String className = element != null ? element.getClassName() : null; final String method = element != null ? element.getMethodName() : null; if ("java.lang.Object".equals(className) && "wait".equals(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: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org