You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/08/03 15:01:12 UTC

[GitHub] [logging-log4j2] carterkozak commented on a change in pull request #553: LOG4J2-3083 Fix slf4j calling class lookup using both accessors

carterkozak commented on a change in pull request #553:
URL: https://github.com/apache/logging-log4j2/pull/553#discussion_r681845225



##########
File path: log4j-api-java9/src/main/java/org/apache/logging/log4j/util/StackLocator.java
##########
@@ -40,6 +41,16 @@ public static StackLocator getInstance() {
     private StackLocator() {
     }
 
+    public Class<?> getCallerClass(final Class<?> sentinelClass, final Predicate<Class<?>> callerPredicate) {

Review comment:
       Missing null checks
   ```suggestion
       public Class<?> getCallerClass(final Class<?> sentinelClass, final Predicate<Class<?>> callerPredicate) {
       if (sentinelClass == null) {
               throw new IllegalArgumentException("sentinelClass cannot be null");
           }
           if (callerPredicate == null) {
               throw new IllegalArgumentException("callerPredicate cannot be null");
           }
   ```




-- 
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-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org