adelapena commented on code in PR #2110:
URL: https://github.com/apache/cassandra/pull/2110#discussion_r1104630951
##########
test/unit/org/apache/cassandra/cql3/functions/masking/ColumnMaskTest.java:
##########
@@ -207,22 +207,22 @@ public void testColumnMaskingWithNotNativeFunction()
throws Throwable
}
@Test
+ @SuppressWarnings("resource")
Review Comment:
The sessions provided by `CQLTester#sessionNet()` are cached in
`CQLTester.sessions`. If we close the session (manually or with
try-with-resources) then the next call to `CQLTester#sessionNet()` will receive
a closed session.
Note that the multiple direct uses of `CQLTester#sessionNet()` on other
tests never try to close the session, and all the flavours of
`CQLTester#sessionNet` don't close it either. That seems to indicate that not
closing the reusable session is the intended use, even if the warning
suppression is not commonly used.
The sessions are later closed in `CQLTester.tearDownClass`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]