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


##########
log4j-api/pom.xml:
##########
@@ -63,16 +63,19 @@
   <dependencies>
 
     <dependency>
-      <groupId>org.jspecify</groupId>
-      <artifactId>jspecify</artifactId>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.core</artifactId>
       <scope>provided</scope>
     </dependency>
 
+    <!--
+      ~ Effectively optional, but included due to its size and the compilation 
warnings its absence causes.
+      -->
     <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-      <scope>provided</scope>
+      <groupId>org.jspecify</groupId>
+      <artifactId>jspecify</artifactId>

Review Comment:
   Yes, I know this is against current policy, but can that policy be 
reevaluated?
   
   The rationale is that keeping nullability annotations in the artifacts is 
mostly useful to `log4j-api` users. Log4j Core calls usually don't appear in 
user code, but Log4j API classes are more used.
   
   While the implementation can certainly do null-checks, we might mark the 
`format` parameters of log calls as `@NonNull`: it doesn't make sense to log 
something, when the format string is `null`. Also the `Level` parameter should 
be marked `@NonNull` as well as many of the parameters and return types of 
`ThreadContext`.



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

Reply via email to