Skip to content

Commit

Permalink
Update airbase to 140
Browse files Browse the repository at this point in the history
This change makes it possible to build project with project.build.targetJdk 21.

Additionally suppress error-prone `CheckReturnValue` violations with Guava 32.0.0

These are the result of following changes:

- google/guava@a7f6b08
- google/guava@0ef6688
  • Loading branch information
wendigo committed Jun 5, 2023
1 parent 22b58b4 commit ddb7b09
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion client/trino-cli/src/main/java/io/trino/cli/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ public boolean run()
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
exiting.set(true);
interruptor.interrupt();
awaitUninterruptibly(exited, EXIT_DELAY.toMillis(), MILLISECONDS);
@SuppressWarnings("CheckReturnValue")
boolean ignored = awaitUninterruptibly(exited, EXIT_DELAY.toMillis(), MILLISECONDS);
// Terminal closing restores terminal settings and releases underlying system resources
closeTerminal();
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void start()
.map(partition -> Futures.submit(() -> loadSplits(partition), executor))
.peek(this::hookErrorListener)
.collect(Collectors.toList());
Futures.whenAllComplete(futures).run(asyncQueue::finish, directExecutor());
hookErrorListener(Futures.whenAllComplete(futures).run(asyncQueue::finish, directExecutor()));
return null;
},
directExecutor());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public void testCounter()
futures.add(executor.submit(() -> {
try {
// wait for the go signal
awaitUninterruptibly(startLatch, 1, TimeUnit.MINUTES);
@SuppressWarnings("CheckReturnValue")
boolean ignored = awaitUninterruptibly(startLatch, 1, TimeUnit.MINUTES);

assertFalse(futures.get(taskNumber).isDone());

Expand All @@ -90,7 +91,8 @@ public void testCounter()

// signal go and wait for tasks to complete
startLatch.countDown();
awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES);
@SuppressWarnings("CheckReturnValue")
boolean ignored = awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES);

assertEquals(counter.get(), totalTasks);
// since this is a fifo executor with one thread and completeLatch is decremented inside the future,
Expand Down Expand Up @@ -142,7 +144,8 @@ private void testBound(int maxThreads, int totalTasks)

// signal go and wait for tasks to complete
startLatch.countDown();
awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES);
@SuppressWarnings("CheckReturnValue")
boolean ignored = awaitUninterruptibly(completeLatch, 1, TimeUnit.MINUTES);

assertFalse(failed.get());
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.airlift</groupId>
<artifactId>airbase</artifactId>
<version>139</version>
<version>140</version>
</parent>

<groupId>io.trino</groupId>
Expand Down

0 comments on commit ddb7b09

Please sign in to comment.