m1a2st commented on code in PR #15958:
URL: https://github.com/apache/kafka/pull/15958#discussion_r1668748500


##########
core/src/main/scala/kafka/network/RequestChannel.scala:
##########
@@ -171,7 +170,7 @@ object RequestChannel extends Logging {
       s"$forwardDescription$header -- ${loggableRequest.toString(details)}"
     }
 
-    def body[T <: AbstractRequest](implicit classTag: ClassTag[T], 
@nowarn("cat=unused") nn: NotNothing[T]): T = {
+    def body[T <: AbstractRequest](implicit classTag: ClassTag[T]): T = {

Review Comment:
   In new Scala version, it will check `@nowarn` annotation, and make that 
build error. 
   ```
   [2024-05-16T08:37:59.531Z] [Error] 
/home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15958/core/src/main/scala/kafka/network/RequestChannel.scala:174:69:
 @nowarn annotation does not suppress any warnings
   [2024-05-16T08:37:59.531Z] one error found
   ```
   In previous comments, we have two way to resolve this.
   1. "-Wconf:cat=unused-nowarn:s" 
   2. Remove the usage of NotNothing
   we decide to use the second way to resolve this problem



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