echauchot commented on PR #17:
URL: 
https://github.com/apache/flink-connector-cassandra/pull/17#issuecomment-1578915246

   > This doesn't seem like such a bad replacement for the data*serializers. +1
   > 
   > This would also work, and _may_ look nicer? shrug
   > 
   > ```
   >         final ByteArrayOutputStream byteArrayOutputStream = new 
ByteArrayOutputStream();                
   >         try (final ObjectOutputStream objectOutputStream =
   >                         new ObjectOutputStream(byteArrayOutputStream)) {
   >             BigIntegerSerializationUtils.write(
   >                     cassandraSplit.getRingRangeStart(), 
objectOutputStream);
   >             BigIntegerSerializationUtils.write(
   >                     cassandraSplit.getRingRangeEnd(), objectOutputStream);
   >         }
   >         return byteArrayOutputStream.toByteArray();
   > ```
   
   But that is the same code I pushed except you've put the 
ByteArrayOutputStream creation outside of the try-with-resources
   and the return outside of the try block ?
   
   This is more of a coding style matter. The other connectors I've looked at 
(kafka and pulsar) and the other serializer in cassandra connector all use the 
coding style I used, so for consistency I would tend to keep 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