mjsax commented on a change in pull request #9309:
URL: https://github.com/apache/kafka/pull/9309#discussion_r497991224



##########
File path: 
clients/src/test/java/org/apache/kafka/clients/producer/MockProducerTest.java
##########
@@ -765,6 +766,16 @@ public void shouldThrowOnFlushProducerIfProducerIsClosed() 
{
             fail("Should have thrown as producer is already closed");
         } catch (IllegalStateException e) { }
     }
+    
+    @Test
+    @SuppressWarnings("unchecked")

Review comment:
       Oh, I see. We actually want to pass in an incorrect key-type to get the 
ClassCastException. So you are right, for this case we cannot specify the 
generics. Keeping the code as-is and to suppress the warning is fine than. 
Totally missed this. Thanks for clarifying.




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

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


Reply via email to