Skip to content

Commit 5142e6c

Browse files
committed
chore: clean up lint issues
1 parent ce5da13 commit 5142e6c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/java/com/influxdb/v3/client/internal/FlightSqlClient.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
final class FlightSqlClient implements AutoCloseable {
7575

7676
private static final Logger LOG = LoggerFactory.getLogger(FlightSqlClient.class);
77-
private static int AUTOCLOSEABLE_CHECK_LIMIT = 10;
78-
private static Map<AutoCloseable, Boolean> CLOSEABLE_CLOSED_LEDGER = new ConcurrentHashMap<>();
77+
private static final int AUTOCLOSEABLE_CHECK_LIMIT = 10;
78+
private static final Map<AutoCloseable, Boolean> CLOSEABLE_CLOSED_LEDGER = new ConcurrentHashMap<>();
7979

8080
private final FlightClient client;
8181

@@ -144,16 +144,16 @@ Stream<VectorSchemaRoot> execute(@Nonnull final String query,
144144
return StreamSupport.stream(spliterator, false).onClose(iterator::close);
145145
}
146146

147-
private void addToAutoCloseable(AutoCloseable closeable) {
147+
private void addToAutoCloseable(@Nonnull final AutoCloseable closeable) {
148148
// need to occasionally clean up references to closed streams
149149
// in order to ensure memory can get freed.
150-
if(autoCloseables.size() > AUTOCLOSEABLE_CHECK_LIMIT) {
150+
if (autoCloseables.size() > AUTOCLOSEABLE_CHECK_LIMIT) {
151151
LOG.info("checking to cleanup stale flight streams from {} known streams", autoCloseables.size());
152152

153153
ListIterator<AutoCloseable> iter = autoCloseables.listIterator();
154-
while(iter.hasNext()){
154+
while (iter.hasNext()) {
155155
AutoCloseable autoCloseable = iter.next();
156-
if(CLOSEABLE_CLOSED_LEDGER.get(autoCloseable)){
156+
if (CLOSEABLE_CLOSED_LEDGER.get(autoCloseable)) {
157157
LOG.info("removing closed stream {}", autoCloseable);
158158
CLOSEABLE_CLOSED_LEDGER.keySet().remove(autoCloseable);
159159
iter.remove();

src/test/java/com/influxdb/v3/client/integration/E2ETest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ public void testMultipleQueries() throws Exception {
471471
String query = "SELECT * FROM " + measurement;
472472

473473
// TODO just checking FlightStream cleanup should be test in FlightSqlClient
474-
for(int i = 0; i < 20; i++) {
474+
for (int i = 0; i < 20; i++) {
475475
try (Stream<PointValues> stream = client.queryPoints(query)) {
476476
stream.forEach(pointValues -> {
477477
Assertions.assertThat(pointValues.getField("life")).isEqualTo(42L);

0 commit comments

Comments
 (0)