Skip to content

Commit 591ad81

Browse files
committed
ninja: followup for CASSANDRA-20829: Wrap iterated partition in try-with-resources
1 parent eb9586d commit 591ad81

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/java/org/apache/cassandra/db/compaction/CompactionTask.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,8 @@ private void maybeNotifyIndexersAboutRowsInFullyExpiredSSTables(Set<SSTableReade
469469
{
470470
while (scanner.hasNext())
471471
{
472-
UnfilteredRowIterator partition = scanner.next();
473-
474-
try (WriteContext ctx = cfs.keyspace.getWriteHandler().createContextForIndexing())
472+
try (UnfilteredRowIterator partition = scanner.next();
473+
WriteContext ctx = cfs.keyspace.getWriteHandler().createContextForIndexing())
475474
{
476475
List<Index.Indexer> indexers = new ArrayList<>();
477476
for (int i = 0; i < indexes.size(); i++)

0 commit comments

Comments
 (0)