You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Robert Stupp (JIRA)" <ji...@apache.org> on 2015/11/20 13:14:11 UTC

[jira] [Commented] (CASSANDRA-9800) 2.2 eclipse-warnings

    [ https://issues.apache.org/jira/browse/CASSANDRA-9800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15016696#comment-15016696 ] 

Robert Stupp commented on CASSANDRA-9800:
-----------------------------------------

Currently, 3.0 + trunk show four warnings - all in {{{CqlRecordWriter}}.

2.2 shows 20 warnings. Most are false-positives, but these are bad:
* {{WindowsFailedSnapshotTracker.deleteOldSnapshots()}} ({{reader}} not safely closed, already handled by patch)
* {{SegmentedFile}} (already handled by patch)
* {{IncomingTcpConnection.receiveMessages()}} (should be revisited, new since this patch)




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