Skip to content

[cherry-pick][0.13] Upgrade Guava to 33.8.0-jre and bump version to 0.13.2-SNAPSHOT - #93

Merged
sahusanket merged 1 commit into
release/0.13from
cherry-pick/guava-33.8.0-0.13
Nov 25, 2026
Merged

sahusanket merged 1 commit into
release/0.13from
cherry-pick/guava-33.8.0-0.13

Conversation

@sahusanket

Copy link
Copy Markdown
Contributor

Summary

Cherry-pick the Guava API migration (#87) and upgrade com.google.guava:guava from 13.0.1 to 33.8.0-jre (#92) on release/0.13 so CDAP release/6.11 resolves both CVE-2026-102554 and CVE-2026-118042.

Also bump io.cdap.common:common and all five child modules from 0.13.1 to 0.13.2-SNAPSHOT for the next 0.13.x snapshot build.

Testing

  • mvn clean verify (Apache RAT, Checkstyle, and all unit tests across all 6 reactor modules) passed on Eclipse Temurin 11.
  • mvn dependency:tree confirmed com.google.guava:guava:jar:33.8.0-jre (+ failureaccess:1.0.3) across all child modules.

….13.2-SNAPSHOT

Cherry-pick the Guava API migration (#87) and bump com.google.guava:guava from 13.0.1 to 33.8.0-jre (#92) on release/0.13. This resolves CVE-2026-102554 and CVE-2026-118042 for CDAP release/6.11, and bumps the common version from 0.13.1 to 0.13.2-SNAPSHOT.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the project's Guava dependency to version 33.8.0-jre and replaces deprecated Guava APIs (such as Charsets, Objects helper methods, InputSupplier, and Throwables.propagate) with standard Java equivalents or modern Guava alternatives. Feedback on these changes suggests improving exception handling during reflective instantiation in ASMDatumWriterFactory and InstantiatorFactory by unwrapping InvocationTargetException before propagation, and using UncheckedIOException instead of a generic RuntimeException in Schema.java when catching IOException.

Comment on lines 63 to 66
} catch (Exception e) {
throw Throwables.propagate(e);
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When invoking a constructor reflectively via Constructor.newInstance, any exception thrown by the constructor is wrapped in an InvocationTargetException. Unwrapping InvocationTargetException first allows unchecked exceptions (such as IllegalArgumentException when the schema does not match) to be propagated directly instead of being double-wrapped in a RuntimeException.

    } catch (Exception e) {
      Throwable cause = e instanceof java.lang.reflect.InvocationTargetException ? e.getCause() : e;
      Throwables.throwIfUnchecked(cause);
      throw new RuntimeException(cause);
    }

Comment on lines 104 to 107
} catch (Exception e) {
throw Throwables.propagate(e);
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to other reflective instantiation points, defaultCons.newInstance() wraps any constructor-thrown exception in an InvocationTargetException. Unwrapping it before calling Throwables.throwIfUnchecked ensures that any unchecked exceptions thrown during instantiation are propagated directly without unnecessary wrapping.

          } catch (Exception e) {
            Throwable cause = e instanceof java.lang.reflect.InvocationTargetException ? e.getCause() : e;
            Throwables.throwIfUnchecked(cause);
            throw new RuntimeException(cause);
          }

Comment on lines 640 to 643
} catch (IOException e) {
// It should never throw IOException on the StringBuilder Writer, if it does, something very wrong.
throw Throwables.propagate(e);
throw new RuntimeException(e);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since the caught exception is an IOException, throwing a java.io.UncheckedIOException is more specific and idiomatic than a generic RuntimeException. This is also consistent with the exception handling changes made in HttpResponse.java.

Suggested change
} catch (IOException e) {
// It should never throw IOException on the StringBuilder Writer, if it does, something very wrong.
throw Throwables.propagate(e);
throw new RuntimeException(e);
}
} catch (IOException e) {
// It should never throw IOException on the StringBuilder Writer, if it does, something very wrong.
throw new java.io.UncheckedIOException(e);
}

@sahusanket
sahusanket merged commit 4efaed7 into release/0.13 Nov 25, 2026
1 check passed
@sahusanket
sahusanket deleted the cherry-pick/guava-33.8.0-0.13 branch November 25, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants