GeezerVison is showing github.com — docs: fix README and advanced usage inconsistencies with actual behavior by brunoborges · Pull Request #1204 · actions/setup-java
Conversation
Description:
Several statements in README.md and docs/advanced-usage.md had drifted away from what the action actually does, which is confusing for users trying to figure out what is supported. This audits both documents against action.yml and src/ and corrects the mismatches.
Most of the docs held up: the java-package compatibility table matches JAVA_PACKAGE_CAPABILITIES, the platform/architecture table matches JAVA_PLATFORM_CAPABILITIES (including the armv7 <18 and x86 <12 restrictions), and the checksum-capable distribution list, verify-signature support, SDKMAN/asdf vendor mappings, cache key format, and cache-jdk matrix are all accurate. The changes here are limited to the parts that were not.
Corrected inaccuracies
- Advanced usage opened with "Inputs
java-version and distribution are mandatory", ignoring java-version-file and distribution inference from .sdkmanrc / .tool-versions.
- The TLS security warning claimed setup-java "does not verify a pinned checksum or signature of the downloaded archive, so TLS is effectively the only integrity guarantee". That is no longer true given automatic checksum verification and
verify-signature. Rewritten so the warning (still valid) no longer rests on a false premise, and it now notes that version metadata requests are the unverified link in the chain.
- The
jdkfile toolchain example claimed id: Oracle_1.6. configureToolchains generates ${vendor}_${version}, so it is jdkfile_1.6. README's mvn-toolchain-id default was also corrected from ${distribution}_... to ${vendor}_..., and the vendor/ID relationship is now spelled out.
- The
liberica-nik row said unsupported java-package values "resolve to the standard bundle". validateJavaPackage rejects them.
- README's
latest description said it always resolves from the distribution's own metadata. Distributions without a release listing (oracle, graalvm) resolve the newest GA major through the Adoptium available-releases API first.
Coverage and navigation
- Added a note that advanced usage examples target the unreleased
@v6 on main while the README pins @v5, listing which inputs are V6-only. This was the most likely source of user confusion, since the two documents pin different versions on purpose.
- Added an IBM Semeru section (it was a supported distribution with no example) and the missing TOC/nav entries for Oracle OpenJDK, Semeru, platform compatibility, settings path, problem matcher, and JDK caching.
- Added JDK caching to README's "What it does", replaced the retired
ubuntu-20.04 runner in an example, and fixed a heading that was h4 instead of h2.
All same-file and cross-file markdown anchors were validated programmatically after the edits.
Related issue:
N/A
Check list:
- Ran
npm run check locally (format, lint, build, test) and all checks pass. Not run: this is a markdown-only change, no node_modules in the worktree, and format-check only covers **/*.{ts,yml,yaml}. No source, test, or dist/ files are touched.
- Mark if documentation changes are required.
- Mark if tests were added or updated to cover the changes.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
- Fix stale claim that java-version and distribution are always mandatory
- Fix security note that claimed no checksum/signature verification exists
- Fix jdkfile toolchain example ID (jdkfile_1.6, not Oracle_1.6)
- Clarify default toolchain ID derives from the vendor, not the distribution
- Drop stale liberica-nik fallback claim; unsupported packages are rejected
- Document IBM Semeru and add missing TOC/nav entries
- Note that advanced-usage examples target the unreleased v6 on main
- Replace retired ubuntu-20.04 runner and fix a heading level
Co-authored-by: Copilot App <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Documentation-focused PR to align README.md and docs/advanced-usage.md with the action’s current behavior (inputs, caching, toolchains, distribution/version resolution), reducing user confusion.
Changes:
- Updated README descriptions and navigation to reflect current behavior (JDK caching,
latest resolution behavior, toolchain ID default).
- Updated advanced usage guidance (v6 vs v5 note, distribution/version-file requirements, Semeru example, toolchain ID semantics, security warning wording).
- Expanded/updated TOC and cross-document links to cover additional sections.
Show a summary per file
| File |
Description |
| README.md |
Adjusts feature list and input defaults/docs, plus adds advanced-usage navigation links. |
| docs/advanced-usage.md |
Updates guidance/examples/TOC to match current behavior and clarify v6 vs v5 usage. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
| `gpg-private-key` | GPG private key to import. | |
|
|
|
| `gpg-passphrase-env-var` | Environment variable name for the GPG private key passphrase. | `GPG_PASSPHRASE` when a key is set |
|
|
|
| `mvn-toolchain-id` | Maven Toolchain ID. When multiple Java versions are installed, the number of IDs must match the number of versions. | `${distribution}_${java-version}` |
|
|
|
| `mvn-toolchain-id` | Maven Toolchain ID. When multiple Java versions are installed, the number of IDs must match the number of versions. | `${vendor}_${java-version}` |
|
Comment on lines
+41
to
+48
|
|
> [!NOTE]
|
|
|
> The examples on this page reference `actions/setup-java@v6`, which is still in
|
|
|
> development on the `main` branch and is not yet published as a release tag. To
|
|
|
> try the V6 features documented here (`cache-jdk`, `force-download`,
|
|
|
> `problem-matcher`, `cache-path`, `cache-read-only`, `java-version: latest`,
|
|
|
> `oracle-openjdk`, and the `*-env-var` input names), reference
|
|
|
> `actions/setup-java@main`. For production workflows use the latest stable
|
|
|
> release, `actions/setup-java@v5`, as shown in the [README](../README.md).
|
Comment on lines
50
to
+51
|
|
## Selecting a Java distribution
|
|
|
Inputs `java-version` and `distribution` are mandatory and needs to be provided. See [Supported distributions](../README.md#Supported-distributions) for a list of available options.
|
|
|
`java-version` and `distribution` select what gets installed. `java-version` may be replaced by `java-version-file`, and `distribution` is optional only when `java-version-file` points to a `.sdkmanrc` or `.tool-versions` file that carries a recognized vendor identifier. In every other case both inputs must be provided. See [Supported distributions](../README.md#Supported-distributions) for a list of available options.
|
This was referenced Aug 5, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|