Skip to content

Render the Java reference with the JDK's own Javadoc, and date its footer - #2542

Merged
joefernandez merged 3 commits into
mainfrom
java-javadoc-26-and-copyright
Nov 3, 2026
Merged

joefernandez merged 3 commits into
mainfrom
java-javadoc-26-and-copyright

Conversation

@joefernandez

Copy link
Copy Markdown
Collaborator

Two backfill fixes to the Java reference build. Both are things a successful build reported no problem with.

1. Pages said Generated by javadoc (17). The pinned JDK isn't only the compiler: adk-java sets maven.compiler.release=17 and that still governs the bytecode, but the Javadoc tool rendering the pages is whichever the JDK ships, and it stamps its version into every file. Pinned to 26 — current Javadoc, library still compiling against 17.

Pinned rather than floating for the same reason the version is stamped at all: a moving JDK would rewrite the whole reference the first time the runner image changed.

2. Pages said Copyright &#169; 1980. All rights reserved. Javadoc fills its default footer from the pom. adk-java sets neither <inceptionYear> nor a project-level <organization> — the only <organization> sits inside <developers>, a different field the plugin doesn't read — so two of three fields were empty and the year fell back to the ZIP epoch. generate.sh now passes -Dbottom explicitly.

The year is the release year, read from the checked-out tag, not the year the build runs. These pages are committed here, so a wall-clock footer would rewrite all of them whenever anyone rebuilt an older version, and the "nothing changed" guard would never fire again.

Both are now asserted in Check the output is real.

Draft deliberately — opening it is the test: the pull_request trigger runs the full build and checks the output.

…oter

Two things the published reference has been getting wrong, both of which a
successful build reported no problem with.

Every page said "Generated by javadoc (17)". The JDK the workflow pins is not
only the compiler here: adk-java sets maven.compiler.release=17 and that still
governs the bytecode, but the Javadoc tool rendering these pages is whichever
one the JDK ships, and it stamps its version into every file. Pin 26 so the
pages are rendered by a current Javadoc while the library goes on compiling
against 17.

Pinned, not floating, for the same reason the version is stamped at all: a
moving JDK would rewrite the entire reference the first time the runner image
changed, and the diff would be a thousand files of nothing.

Every page also said "Copyright (c) 1980. All rights reserved." Javadoc fills
its default footer from the pom, and adk-java sets neither <inceptionYear> nor
a project-level <organization> - the only <organization> in it is inside
<developers>, a different field the plugin does not read - so two of the three
fields were empty and the year fell back to the ZIP epoch. generate.sh now
passes -Dbottom explicitly.

The year in it is the year of the release being documented, read from the tag
just checked out, rather than the year the build happens to run. These pages
are committed to this repository, so a footer following the wall clock would
rewrite all of them the first time anybody rebuilt an older version, and the
workflow's "nothing changed" guard would never fire again.

Both are now asserted in "Check the output is real", because both are
failures a build otherwise completes happily through.
@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit 70ddc13
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6aea1c9c561b4aae73ff9c7c
😎 Deploy Preview https://deploy-preview-2542--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

grep exits 1 when it matches nothing, find -exec + passes that on, and
pipefail kills the step - so the check failed exactly when the thing it looks
for was absent, which is the case it is supposed to pass. Its own first green
run is what caught it.

The analytics check above it is safe for a reason worth not mis-copying: -L
exits 0 when every file matches, where -l exits 1 when none does.

Also assert the footer that should be there, not only the absence of the one
that should not. A check that can only say 'not 1980' would be satisfied by a
page with no footer at all.
@joefernandez
joefernandez marked this pull request as ready for review November 2, 2026 16:50

@joefernandez joefernandez left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Content review report

  • Review Score: 97/100
  • Overall assessment: 🟡 Medium Risk
  • Summary reasoning: The PR changes the copyright footer that Javadoc writes on every generated Java reference page (about 1,136 files once the reference is regenerated), and a CI check then requires that exact wording. The new text fixes a real defect: the old footer named no owner and gave the year as 1980. It is still a change to legal text. The JDK bump will also change the bundled third-party license notices when the reference is regenerated.
  • Recommended action: Approve with confirmation. The PR needs no text changes. Before the regenerated pages land, confirm the footer wording ("Google LLC", a single release year, no "All rights reserved") with whoever owns OSS legal conventions for ADK. When the regeneration PR arrives, check that docs/api-reference/java/legal/ is correct.
  • Number of lines changed: M (92)
  • Number of files changed: 3

🟡 Medium risk items

🟢 Low risk items

  • The JDK 26 pin will change the bundled third-party legal notices (legal/) in the regenerated output. See the inline comment on update-java-api-docs.yaml L114.

No other risk categories apply. The PR makes no claims about security, privacy, performance, pricing, future features or third-party products. It names no customers or people and links only to public github.com resources. The text "Generated by javadoc (17)" quotes tool output and makes no claim.

echo "Error: could not read the release year from the adk-java tag." >&2
exit 1
fi
JAVADOC_BOTTOM="Copyright &#169; ${RELEASE_YEAR} Google LLC."

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

L0 RISK REVIEW (Medium): This changes the legal footer on every generated page under docs/api-reference/java/ (about 1,136 files) the next time the reference is regenerated. The CI check at update-java-api-docs.yaml L176-L177 then requires this exact form. The new text fixes a real defect: the old footer had no owner and gave the year as 1980. It also matches the standard Copyright YYYY Google LLC header. However, the year comes from the committer date of the tagged commit (L83), which is a choice about legal text. No text change is needed. Please confirm the wording ("Google LLC", a single year, no "All rights reserved") with whoever owns OSS legal conventions for ADK before the regenerated pages land.

@KevinACheek KevinACheek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pinning the JDK version prevents noisy file diffs caused by rolling Javadoc version stamps in future rebuilds. Additionally, deriving the copyright year from the git tag rather than the wall clock ensures idempotent builds when regenerating older versions. The tooling updates successfully resolve the generation defects.
(Ai-generated review comment using go/method-ai)

@joefernandez
joefernandez merged commit 4648d12 into main Nov 3, 2026
7 of 9 checks passed
@joefernandez
joefernandez deleted the java-javadoc-26-and-copyright branch November 3, 2026 17:41
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.

2 participants