> On April 16, 2015, 5:29 p.m., Ewen Cheslack-Postava wrote:
> > clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java, 
> > line 548
> > <https://reviews.apache.org/r/33242/diff/2/?file=931792#file931792line548>
> >
> >     One idea for making this less verbose and redundant: make all of these 
> > classes implement Closeable so we can just write one utility method for 
> > trying to close something and catching the exception.
> 
> Steven Wu wrote:
>     yes. I thought about it. it may break binary compatibility, e.g. 
> Serializer. Sender and Metrics classes are probably only used internally. let 
> me know your thoughts.
> 
> Ewen Cheslack-Postava wrote:
>     I'm pretty sure it's fine, based on this
>     
>     "Changing the direct superclass or the set of direct superinterfaces of a 
> class type will not break compatibility with pre-existing binaries, provided 
> that the total set of superclasses or superinterfaces, respectively, of the 
> class type loses no members."
>     
>     from https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html

ok. you could be correct. here is another reference (easier to understand than 
the jls doc)

"Expand superinterface set (direct or inherited)        -       Binary 
compatible"

from https://wiki.eclipse.org/Evolving_Java-based_APIs_2#Evolving_API_Interfaces


- Steven


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33242/#review80346
-----------------------------------------------------------


On April 19, 2015, 3:09 a.m., Steven Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33242/
> -----------------------------------------------------------
> 
> (Updated April 19, 2015, 3:09 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-2121
>     https://issues.apache.org/jira/browse/KAFKA-2121
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> fix potential resource leak when KafkaProducer contructor failed in the middle
> 
> 
> Diffs
> -----
> 
>   clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java 
> b91e2c52ed0acb1faa85915097d97bafa28c413a 
>   clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java 
> b3d3d7c56acb445be16a3fbe00f05eaba659be46 
>   clients/src/main/java/org/apache/kafka/common/serialization/Serializer.java 
> c2fdc23239bd2196cd912c3d121b591f21393eab 
>   
> clients/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33242/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Steven Wu
> 
>

Reply via email to