Skip to content

Commit

Permalink
Remove unnecessary doulbe try-with-resource and reuse cursor instead
Browse files Browse the repository at this point in the history
  • Loading branch information
burqen committed Oct 5, 2018
1 parent fbf3128 commit eb68a4a
Showing 1 changed file with 3 additions and 7 deletions.
Expand Up @@ -429,19 +429,15 @@ private void assertIndexedNodesMatchesStoreNodes() throws Exception
{
fail( join( mismatches.toArray(), format( "%n" ) ) );
}
}
// Node count == indexed node count
int nodesInIndex;
try ( NodeValueIndexCursor cursor = ktx.cursors().allocateNodeValueIndexCursor() )
{
// Node count == indexed node count
ktx.dataRead().nodeIndexSeek( index, cursor, IndexOrder.NONE, false, IndexQuery.exists( propertyKeyId ) );
nodesInIndex = 0;
int nodesInIndex = 0;
while ( cursor.next() )
{
nodesInIndex++;
}
assertEquals( nodesInStore, nodesInIndex );
}
assertEquals( nodesInStore, nodesInIndex );
}
}

Expand Down

0 comments on commit eb68a4a

Please sign in to comment.