Skip to content

fix(bom): make release-note-generation Java 8 compatible#13837

Merged
lqiu96 merged 4 commits into
mainfrom
fix_java8_class_version
Jul 20, 2026
Merged

fix(bom): make release-note-generation Java 8 compatible#13837
lqiu96 merged 4 commits into
mainfrom
fix_java8_class_version

Conversation

@lqiu96

@lqiu96 lqiu96 commented Jul 20, 2026

Copy link
Copy Markdown
Member

This changes the target version to 1.8 and replaces Java 9+ API usage.

Error:

Error: 9:999 [ERROR] com/google/cloud/ReleaseNoteGenerationTest has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

from https://github.com/googleapis/google-cloud-java/actions/runs/29757930805/job/88405320844?pr=13799

lqiu96 added 2 commits July 20, 2026 17:54
This changes the target version to 1.8 and replaces Java 9+ API usage.

TAG=agy

CONV=f312eaf9-61ab-449f-868d-eae4d12a1830
TAG=agy

CONV=f312eaf9-61ab-449f-868d-eae4d12a1830
@lqiu96
lqiu96 requested a review from jinseopkim0 July 20, 2026 17:57
@lqiu96
lqiu96 requested a review from a team as a code owner July 20, 2026 17:57

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

Copy link
Copy Markdown
Contributor

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 downgrades the Java compiler source and target versions from 11 to 1.8 in the release-note-generation module. To maintain compatibility with Java 8, the code replaces InputStream.readAllBytes() with Guava's ByteStreams.toByteArray(). The review feedback suggests a more efficient alternative using CharStreams.toString with an InputStreamReader to avoid intermediate byte array allocations.

…eration

TAG=agy

CONV=f312eaf9-61ab-449f-868d-eae4d12a1830
@lqiu96
lqiu96 enabled auto-merge (squash) July 20, 2026 18:19
@lqiu96
lqiu96 merged commit bc18390 into main Jul 20, 2026
203 of 204 checks passed
@lqiu96
lqiu96 deleted the fix_java8_class_version branch July 20, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants