[ https://issues.apache.org/jira/browse/CASSANDRA-9800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018403#comment-15018403 ]
Robert Stupp commented on CASSANDRA-9800: ----------------------------------------- Sorry, I should have explained better what I did and not cause any confusion: I ran the eclipse-warnings task against the unpatched branches and saw the differences - so not a fault of your patch. And I can confirm that your patches fix all those warnings and the changes LGTM except that WindowsFailedSnapshotTracker.deleteOldSnapshots can still leak a handle on {{reader}}. Can you fix that one in the 2.2 branch and trigger cassci runs on both? Should be good to commit then. > 2.2 eclipse-warnings > -------------------- > > Key: CASSANDRA-9800 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9800 > Project: Cassandra > Issue Type: Bug > Components: Testing > Reporter: Michael Shuler > Assignee: Ariel Weisberg > Fix For: 2.2.x > > > commit 052222615a754e5bbb5299d51470a2ccdb70a5b0 > Date: Mon Jul 13 17:53:42 2015 -0400 > If you wish to look at the latest output, check the > {{eclipse_compiler_checks.txt}} artifact saved on the latest build: > http://cassci.datastax.com/job/cassandra-2.2_eclipse-warnings/lastBuild/ > Output of current 2.2 HEAD eclipse-warnings: > {noformat} > # 7/14/15 12:21:30 AM UTC > # Eclipse Compiler for Java(TM) v20150120-1634, 3.10.2, Copyright IBM Corp > 2000, 2013. All rights reserved. > incorrect classpath: > /mnt/data/jenkins/workspace/cassandra-2.2_eclipse-warnings/build/cobertura/classes > ---------- > 1. ERROR in > /mnt/data/jenkins/workspace/cassandra-2.2_eclipse-warnings/src/java/org/apache/cassandra/tools/SSTableExport.java > (at line 315) > ISSTableScanner scanner = reader.getScanner(); > ^^^^^^^ > Resource 'scanner' should be managed by try-with-resource > ---------- > ---------- > 2. ERROR in > /mnt/data/jenkins/workspace/cassandra-2.2_eclipse-warnings/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java > (at line 247) > scanners.add(new LeveledScanner(intersecting, range)); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Potential resource leak: '<unassigned Closeable value>' may not be closed > ---------- > ---------- > 3. ERROR in > /mnt/data/jenkins/workspace/cassandra-2.2_eclipse-warnings/src/java/org/apache/cassandra/db/compaction/CompactionManager.java > (at line 819) > ISSTableScanner scanner = cleanupStrategy.getScanner(sstable, > getRateLimiter()); > ^^^^^^^ > Resource 'scanner' should be managed by try-with-resource > ---------- > ---------- > 4. ERROR in > /mnt/data/jenkins/workspace/cassandra-2.2_eclipse-warnings/src/java/org/apache/cassandra/db/WindowsFailedSnapshotTracker.java > (at line 55) > BufferedReader reader = new BufferedReader(new > FileReader(TODELETEFILE)); > ^^^^^^ > Resource 'reader' should be managed by try-with-resource > ---------- > 5. ERROR in > /mnt/data/jenkins/workspace/cassandra-2.2_eclipse-warnings/src/java/org/apache/cassandra/db/WindowsFailedSnapshotTracker.java > (at line 55) > BufferedReader reader = new BufferedReader(new > FileReader(TODELETEFILE)); > ^^^^^^ > Resource 'reader' should be managed by try-with-resource > ---------- > ---------- > 6. ERROR in > /mnt/data/jenkins/workspace/cassandra-2.2_eclipse-warnings/src/java/org/apache/cassandra/io/util/SegmentedFile.java > (at line 183) > ChannelProxy channelCopy = getChannel(path); > ^^^^^^^^^^^ > Resource 'channelCopy' should be managed by try-with-resource > ---------- > 7. ERROR in > /mnt/data/jenkins/workspace/cassandra-2.2_eclipse-warnings/src/java/org/apache/cassandra/io/util/SegmentedFile.java > (at line 186) > return complete(channelCopy, overrideLength); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Potential resource leak: 'channelCopy' may not be closed at this location > ---------- > 7 problems (7 errors) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)