OS: Windows 11 Java version: OpenJDK 21.0.1

openjdk 21.0.1 2023-10-17 LTS
OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode, sharing)

Spring Boot version: 3.2.1

After upgrade from Spring Boot 3.2.0 to 3.2.1 methods from java.util.Package are not working and are returning nulls, such as getImplementationVersion(), getImplementationVendor() and getImplementationTitle().

I have created a small example here with a REST API Controller that returns data from beforementioned methods here: https://github.com/mnorsic/manifest-example

When running application JAR from build\libs directory using Java CLI java.exe -jar .\manifest-example-0.0.1-SNAPSHOT.jar

Spring Boot 3.2.0 returns {"vendor":"ACME Company LLC","title":"Manifest Example","version":"0.0.1-SNAPSHOT"} Spring Boot 3.2.1 returns {"vendor":null,"title":null,"version":null}

Comment From: wilkinsona

Thanks, @mnorsic, but I'm getting a 404 when trying to access the sample.

Comment From: Thunderforge

I am encountering this problem too. Reproduction steps:

  1. Download a new project from https://start.spring.io/ with all default settings
  2. In src/main/java/com/example/demo/DemoApplication, add the following to the main() method: System.out.println("Implementation version: " + DemoApplication.class.getPackage().getImplementationVersion());
  3. Run ./gradlew bootJar
  4. From the project root, run the following: java -jar build/libs/demo-0.0.1-SNAPSHOT.jar

On Spring Boot 3.2.0, the output is:

Implementation version: 0.0.1-SNAPSHOT

But on Spring Boot 3.2.1, the output is:

Implementation version: null

The MANIFEST.MF files are identical between the two.

Comment From: philwebb

I think this regression might have been caused by f31ffbf927468c953c845dcc87b258fe9de9a550

Comment From: mnorsic

Thanks, @mnorsic, but I'm getting a 404 when trying to access the sample.

Oops, my bad: project was private instead of public, I have changed it now. But I see that you managed to reproduce it anyway...

Comment From: voria

This regression also affects the banner, where application.* variables are unset.