mirror of https://github.com/apache/cassandra
Fix 2.2 eclipse-warnings
patch by Mick Semb Wever; reviewed by Benedict for CASSANDRA-15427
This commit is contained in:
parent
50b7094278
commit
f05bf64fc1
|
|
@ -844,6 +844,7 @@ public class CompactionManager implements CompactionManagerMBean
|
|||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@SuppressWarnings("resource")
|
||||
private void doCleanupOne(final ColumnFamilyStore cfs, LifecycleTransaction txn, CleanupStrategy cleanupStrategy, Collection<Range<Token>> ranges, boolean hasIndexes) throws IOException
|
||||
{
|
||||
assert !cfs.isIndex();
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ public class LeveledCompactionStrategy extends AbstractCompactionStrategy
|
|||
return maxSSTableSizeInMB * 1024L * 1024L;
|
||||
}
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
public ScannerList getScanners(Collection<SSTableReader> sstables, Range<Token> range)
|
||||
{
|
||||
Set<SSTableReader>[] sstablesPerLevel = manifest.getSStablesPerLevelSnapshot();
|
||||
|
|
|
|||
|
|
@ -312,8 +312,7 @@ public class SSTableExport
|
|||
excludeSet = new HashSet<>(Arrays.asList(excludes));
|
||||
|
||||
SSTableIdentityIterator row;
|
||||
ISSTableScanner scanner = reader.getScanner();
|
||||
try
|
||||
try (ISSTableScanner scanner = reader.getScanner())
|
||||
{
|
||||
outs.println("[");
|
||||
|
||||
|
|
@ -340,10 +339,6 @@ public class SSTableExport
|
|||
outs.println("\n]");
|
||||
outs.flush();
|
||||
}
|
||||
finally
|
||||
{
|
||||
scanner.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue