Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#15208] improvement(deps): Update Guava to 33.8.0-jre (#15209)

geyanggang9a3748eb6d67
diff --git a/.github/trivy/trivyignore.yaml b/.github/trivy/trivyignore.yaml
index 941c4e08fe..7e205d1275 100644
--- a/.github/trivy/trivyignore.yaml
+++ b/.github/trivy/trivyignore.yaml
@@ -178,8 +178,6 @@ vulnerabilities:
- id: CVE-2026-102554
purls:
- pkg:maven/com.google.guava/[email protected]
- - pkg:maven/com.google.guava/[email protected]
- - pkg:maven/com.google.guava/[email protected]
- pkg:maven/com.google.guava/[email protected]
- pkg:maven/com.google.guava/[email protected]
- pkg:maven/com.google.guava/[email protected]
diff --git a/LICENSE.iceberg b/LICENSE.iceberg
index 1b6d3f4651..01e1b40ad0 100644
--- a/LICENSE.iceberg
+++ b/LICENSE.iceberg
@@ -288,6 +288,7 @@
Apache Java Data Objects (JDO)
JetS3t
JJWT
+ JSpecify
Joda Time
Apache Kerby
Apache Thrift
diff --git a/LICENSE.lance b/LICENSE.lance
index 6b6373fa59..640e825c84 100644
--- a/LICENSE.lance
+++ b/LICENSE.lance
@@ -233,6 +233,7 @@
Jackson JAXRS Base
Jackson JAXRS JSON Provider
Jackson Module JAXB Annotations
+ JSpecify
LanceDB Lance Namespace Core
LanceDB Lance Namespace Apache Client
Apache Arrow Vector
diff --git a/LICENSE.trino b/LICENSE.trino
index 5edc81dcb2..8bb811b917 100644
--- a/LICENSE.trino
+++ b/LICENSE.trino
@@ -218,6 +218,7 @@
Jackson Datatype JSR310
Jackson Parameter Names
Jakarta Dependency Injection
+ JSpecify
Airlift
Trino JDBC Driver
fast_double_parser
diff --git a/build.gradle.kts b/build.gradle.kts
index 1e007bd7db..6100e0813f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -684,6 +684,7 @@ fun excludePackagesForSparkConnector(project: Project) {
val commonsBeanutilsVersion: String = libs.versions.commons.beanutils.get()
val httpcore5Version: String = libs.versions.httpcore5.get()
+val jsr305Dependency = libs.jsr305
subprojects {
// Gravitino Python client project didn't need to apply the java plugin
@@ -747,6 +748,12 @@ subprojects {
mavenLocal()
}
+ // Guava no longer brings jsr305 transitively since 33.5.0, but the sources use
+ // javax.annotation.Nullable and friends. Keep them on the compile classpath only.
+ dependencies {
+ compileOnly(jsr305Dependency)
+ testCompileOnly(jsr305Dependency)
+ }
val jdk8CompatibleProjectPathPrefixes = setOf(
":api",
":common",
diff --git a/bundles/iceberg-gcp-bundle/build.gradle.kts b/bundles/iceberg-gcp-bundle/build.gradle.kts
index 6ef87fbbc9..86acfff39d 100644
--- a/bundles/iceberg-gcp-bundle/build.gradle.kts
+++ b/bundles/iceberg-gcp-bundle/build.gradle.kts
@@ -25,6 +25,9 @@ plugins {
}
dependencies {
+ // Align Guava with the version Gravitino uses, instead of the older Android flavor brought by
+ // the Google auth libraries.
+ implementation(libs.guava)
implementation(libs.google.auth.credentials)
implementation(libs.google.auth.http)
implementation(libs.iceberg.gcp.bundle)
diff --git a/clients/client-java-runtime/src/test/java/org/apache/gravitino/client/TestRuntimeJarLegalFiles.java b/clients/client-java-runtime/src/test/java/org/apache/gravitino/client/TestRuntimeJarLegalFiles.java
index 1ff30a01b8..d1d99befd4 100644
--- a/clients/client-java-runtime/src/test/java/org/apache/gravitino/client/TestRuntimeJarLegalFiles.java
+++ b/clients/client-java-runtime/src/test/java/org/apache/gravitino/client/TestRuntimeJarLegalFiles.java
@@ -89,15 +89,12 @@ class TestRuntimeJarLegalFiles {
@Test
void testMissingBundledLicensesAreSupplemented() throws IOException {
try (JarFile jar = artifact()) {
- for (String name :
- Arrays.asList(
- "LICENSE.jsr305-concurrent", "LICENSE.fastdoubleparser-0.9.0", "LICENSE.schubfach")) {
+ for (String name : Arrays.asList("LICENSE.fastdoubleparser-0.9.0", "LICENSE.schubfach")) {
assertArrayEquals(
Files.readAllBytes(Paths.get(System.getProperty("legalTemplates"), name)),
readBytesBySuffix(jar, "/" + name),
name);
}
- assertTrue(readEntry(jar, "META-INF/LICENSE").contains("CC-BY-2.5"));
}
}
diff --git a/core/src/main/java/org/apache/gravitino/utils/PrincipalUtils.java b/core/src/main/java/org/apache/gravitino/utils/PrincipalUtils.java
index a324964f11..2e1abde619 100644
--- a/core/src/main/java/org/apache/gravitino/utils/PrincipalUtils.java
+++ b/core/src/main/java/org/apache/gravitino/utils/PrincipalUtils.java
@@ -19,7 +19,6 @@
package org.apache.gravitino.utils;
-import com.google.common.base.Throwables;
import java.nio.charset.StandardCharsets;
import java.security.Principal;
import java.security.PrivilegedActionException;
@@ -54,7 +53,12 @@ public class PrincipalUtils {
} catch (PrivilegedActionException pae) {
LOG.error("doAs method encountered an exception", pae);
Throwable cause = pae.getCause();
- Throwables.propagateIfPossible(cause, Exception.class);
+ if (cause instanceof Exception) {
+ throw (Exception) cause;
+ }
+ if (cause instanceof Error) {
+ throw (Error) cause;
+ }
throw new RuntimeException("doAs method encountered an unexpected exception", pae);
} catch (Error error) {
LOG.error("doAs method encountered an unexpected error", error);
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index f9606604f4..8310110f46 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -35,7 +35,7 @@ jackson218 = "2.18.12"
jackson221 = "2.21.8"
snakeyaml = "2.0"
gson = "2.11.0"
-guava = "32.1.3-jre"
+guava = "33.8.0-jre"
lombok = "1.18.20"
slf4j = "2.0.17"
log4j = "2.25.4"
diff --git a/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/CloseableGroup.java b/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/CloseableGroup.java
index 829edf5710..b536b7cdaa 100644
--- a/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/CloseableGroup.java
+++ b/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/CloseableGroup.java
@@ -15,7 +15,8 @@
// core/trino-main/src/main/java/io/trino/util/AutoCloseableCloser.java
package org.apache.gravitino.integration.test.util;
-import static com.google.common.base.Throwables.propagateIfPossible;
+import static com.google.common.base.Throwables.throwIfInstanceOf;
+import static com.google.common.base.Throwables.throwIfUnchecked;
import static java.util.Objects.requireNonNull;
import java.util.ArrayDeque;
@@ -54,7 +55,8 @@ public final class CloseableGroup implements AutoCloseable {
}
}
if (rootCause != null) {
- propagateIfPossible(rootCause, Exception.class);
+ throwIfInstanceOf(rootCause, Exception.class);
+ throwIfUnchecked(rootCause);
// not possible
throw new AssertionError(rootCause);
}