Zoltan Chovan has posted comments on this change. ( http://gerrit.cloudera.org:8080/22491 )
Change subject: [java] code cleanup ...................................................................... Patch Set 7: (1 comment) http://gerrit.cloudera.org:8080/#/c/22491/7/java/kudu-test-utils/src/main/java/org/apache/kudu/test/CapturingToFileLogAppender.java File java/kudu-test-utils/src/main/java/org/apache/kudu/test/CapturingToFileLogAppender.java: http://gerrit.cloudera.org:8080/#/c/22491/7/java/kudu-test-utils/src/main/java/org/apache/kudu/test/CapturingToFileLogAppender.java@131 PS7, Line 131: outputFile.toPath() > I'll test this to confirm. You're right, this would throw an NPE if close() is called twice. The only protection for the close() not being called twice is that the CapturingToFileLogAppender is AutoCloseable, so there is "no reason" to call the close() explicitly, however this is a public method, there's no guarantee that it will not happen. I'm reverting this change. -- To view, visit http://gerrit.cloudera.org:8080/22491 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iedaf7ffb0689f4c190fd585e73687b9c6c668890 Gerrit-Change-Number: 22491 Gerrit-PatchSet: 7 Gerrit-Owner: Zoltan Chovan <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Zoltan Chovan <[email protected]> Gerrit-Reviewer: Zoltan Martonka <[email protected]> Gerrit-Comment-Date: Mon, 24 Feb 2025 15:11:01 +0000 Gerrit-HasComments: Yes
