Skip to content

Commit

Permalink
Actually write the manifest we generate to the jar.
Browse files Browse the repository at this point in the history
Fixes #7185

RELNOTES=n/a
PiperOrigin-RevId: 628393483
  • Loading branch information
DarkaMaul authored and Google Java Core Libraries committed Apr 26, 2024
1 parent 21fb201 commit 348be7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -539,7 +539,7 @@ private static void writeSelfReferencingJarFile(File jarFile, String... entries)
Closer closer = Closer.create();
try {
FileOutputStream fileOut = closer.register(new FileOutputStream(jarFile));
JarOutputStream jarOut = closer.register(new JarOutputStream(fileOut));
JarOutputStream jarOut = closer.register(new JarOutputStream(fileOut, manifest));
for (String entry : entries) {
jarOut.putNextEntry(new ZipEntry(entry));
Resources.copy(ClassPathTest.class.getResource(entry), jarOut);
Expand Down
Expand Up @@ -604,7 +604,7 @@ private static void writeSelfReferencingJarFile(File jarFile, String... entries)
Closer closer = Closer.create();
try {
FileOutputStream fileOut = closer.register(new FileOutputStream(jarFile));
JarOutputStream jarOut = closer.register(new JarOutputStream(fileOut));
JarOutputStream jarOut = closer.register(new JarOutputStream(fileOut, manifest));
for (String entry : entries) {
jarOut.putNextEntry(new ZipEntry(entry));
Resources.copy(ClassPathTest.class.getResource(entry), jarOut);
Expand Down

0 comments on commit 348be7b

Please sign in to comment.