Skip to content

java.util.jar.JarInputStream.getManifest() returns null for quarkus-runner.jar #5399

@dabloem

Description

@dabloem

Describe the bug
JarInputStream.getManifest() returns null for quarkus-runner.jar

Expected behavior
Return non-null Manifest.class

Actual behavior
Returns null

To Reproduce
Steps to reproduce the behavior:

  1. create quarkus-runner.jar (which includes META-INF/MANIFEST.MF)
  2. execute the following code
InputStream file = Main.class.getResourceAsStream("/quarkus-runner.jar");
Manifest manifest = new JarInputStream(file).getManifest();
Objects.requireNonNull(manifest);
  1. Verify NullPointerException

Environment (please complete the following information):

  • Output of uname -a or ver: Linux
  • Output of java -version: OpenJDK-8, IBM-8, Corretto-8
  • Quarkus version or git rev: 1.0.0.CR1

Additional context
Issue encountered when using azure-webapp-maven-plugin:1.8.0, which verifies if the deployed jar is an executable jar based on JarInputStream.class

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions