You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/09/30 22:39:38 UTC

[GitHub] [kafka] gmunozfe commented on a change in pull request #9309: KAFKA-10503: MockProducer doesn't throw ClassCastException when no

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



##########
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:
       Thanks a lot for your review @mjsax 
   If I add generics, bounded type parameters will make compilation fail, as types are checked and incompatible.
   In fact, the purpose of this enhancement is that MockProducer throws the exception when types are not restricted, wdyt?




----------------------------------------------------------------
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:
users@infra.apache.org