StephanEwen commented on a change in pull request #8282: [FLINK-12338] Update
Apache Avro test to use try-with-resources
URL: https://github.com/apache/flink/pull/8282#discussion_r280776846
##########
File path:
flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroKryoSerializerRegistrationsTest.java
##########
@@ -56,8 +56,9 @@
public void testDefaultKryoRegisteredClassesDidNotChange() throws
Exception {
final Kryo kryo = new KryoSerializer<>(Integer.class, new
ExecutionConfig()).getKryo();
- try (BufferedReader reader = new BufferedReader(new
InputStreamReader(
Review comment:
I think changes like this one are not necessary. The `BufferedReader`
forwards the `close()` call to the nested `InputStreamReader`. So there is no
need to have them separate in the `try(...)` clause.
I would keep the original pattern, which seems easier to read/format.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services