You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/05/03 19:44:22 UTC

[GitHub] [beam] scwhittle commented on a change in pull request #14704: [BEAM-12253] Change Read.UnboundedSourceAsSDFRestrictionTracker.getSplitBacklog to use the reader cache

scwhittle commented on a change in pull request #14704:
URL: https://github.com/apache/beam/pull/14704#discussion_r625322809



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java
##########
@@ -386,6 +387,8 @@ protected void finalize() throws Throwable {
             currentReader.close();
           } catch (IOException e) {
             LOG.error("Failed to close BoundedReader due to failure processing bundle.", e);
+          } finally {
+            currentReader = null;

Review comment:
       Thanks! Fixed spotbugs issue about setting field to null in finalize() method, which is not recommended as it is being GC'd anyway.




-- 
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