Skip to content

Temurin version incorrectly converted for setup-java 6.0.x #1270

Closed

Description

@paulie-of-punskas

Description:
After upgrade from 5.7.0 to 6.0.0 and 6.0.1, I noticed that setup-java does not recognize Temurin's versions anymore (e.g. "26.0.2+10"). This leads to an "is not valid SemVer notation for a Java version" error.

The following regular expression does not not pick up Temurin's version correctly:

if (/^\d+(\.\d+){3,}$/.test(version)) {
version = convertVersionToSemver(version);
}
if (!semver.validRange(version)) {
throw new Error(
`The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information`
);
}

The issue seems to be similar to: #1267

Task version:
v6, v6.0.1

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

Expected behavior:
Successfully resolve Temurin version.

Actual behavior:
setup-java >= 6.0.0 returns

The string '26.0.2.1+1' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information

Activity

  1. v-mahabaleshwars commented on Sep 17, 2026

    @v-mahabaleshwars
    Contributor

    Hi @paulie-of-punskas,
Thank you for creating this issue. We will investigate it and provide feedback as soon as we have some updates.

  2. brunoborges commented on Oct 2, 2026

    @brunoborges
    Contributor

    @paulie-of-punskas can you please test the changes, using @main as the version?

  3. paulie-of-punskas commented on Oct 3, 2026

    @paulie-of-punskas
    Author

    @brunoborges it works nicely. Thanks for addressing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions