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


##########
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:
   > It was there for a reason (to prevent cases where ClassTag is 
automatically inferred to Nothing)
   
   That was a good protection, but we use the request once casting the `body`. 
Hence, the `nothing` type (i.e request.body`) will be noticed soon as we can't 
call any methods from it. 
   
   > we decide to use the second way to resolve this problem
   
   As @m1a2st mentioned, there is another approach for it. We can go back to 
use it if @ijuma prefer it 



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