Repository navigation
Render the Java reference with the JDK's own Javadoc, and date its footer - #2542
Conversation
…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.
✅ Deploy Preview for adk-docs-preview ready!
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
left a comment
There was a problem hiding this comment.
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
- Copyright footer text changed on all generated reference pages, and CI makes that form mandatory. See the inline comment on
generate.shL83-L94 andupdate-java-api-docs.yamlL173-L177.
🟢 Low risk items
- The JDK 26 pin will change the bundled third-party legal notices (
legal/) in the regenerated output. See the inline comment onupdate-java-api-docs.yamlL114.
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 © ${RELEASE_YEAR} Google LLC." |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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)
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 setsmaven.compiler.release=17and 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 © 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.shnow passes-Dbottomexplicitly.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_requesttrigger runs the full build and checks the output.