[jdk21u-dev] Integrated: 8302293: jar --create fails with IllegalArgumentException if archive name is shorter than 3 characters

Satyen Subramaniam ssubramaniam at openjdk.org
Fri Jun 13 16:38:46 UTC 2025


On Mon, 9 Jun 2025 17:12:55 GMT, Satyen Subramaniam <ssubramaniam at openjdk.org> wrote:

> Backporting JDK-8302293: jar --create fails with IllegalArgumentException if archive name is shorter than 3 characters. This change addresses a bug with the "jar --create" operation, where if the original file name is lesser than 3 characters, the temporary file creation which uses the original file's name as the temporary file name prefix, runs into an exception. Although this issue is sort of an edge case (as in most cases the ".jar" extension will be used), there are scenarios where it may intentionally be omitted (ex: with Linux binfmt making Java programs look and feel like native Linux binaries). Ran GHA Sanity Checks, local Tier 1 and 2, and new test directly. Patch is clean.

This pull request has now been integrated.

Changeset: cf8601c7
Author:    Satyen Subramaniam <ssubramaniam at openjdk.org>
URL:       https://git.openjdk.org/jdk21u-dev/commit/cf8601c7d50539c461896cf8af77943f0af45228
Stats:     78 lines in 2 files changed: 73 ins; 0 del; 5 mod

8302293: jar --create fails with IllegalArgumentException if archive name is shorter than 3 characters

Backport-of: bd0fde71d9113bad902e71b61f0ca44c650809ef

-------------

PR: https://git.openjdk.org/jdk21u-dev/pull/1858


More information about the jdk-updates-dev mailing list