From 348be7bd1764ad12b41bcb661a91b31ae2009049 Mon Sep 17 00:00:00 2001 From: Alexis Date: Fri, 26 Apr 2024 06:59:40 -0700 Subject: [PATCH] Actually write the manifest we generate to the jar. Fixes #7185 RELNOTES=n/a PiperOrigin-RevId: 628393483 --- .../test/com/google/common/reflect/ClassPathTest.java | 2 +- guava-tests/test/com/google/common/reflect/ClassPathTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/guava-tests/test/com/google/common/reflect/ClassPathTest.java b/android/guava-tests/test/com/google/common/reflect/ClassPathTest.java index f5f8f3774e7d..1f95a840b0b1 100644 --- a/android/guava-tests/test/com/google/common/reflect/ClassPathTest.java +++ b/android/guava-tests/test/com/google/common/reflect/ClassPathTest.java @@ -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); diff --git a/guava-tests/test/com/google/common/reflect/ClassPathTest.java b/guava-tests/test/com/google/common/reflect/ClassPathTest.java index 8aed780d4dfc..1357d00e0dc8 100644 --- a/guava-tests/test/com/google/common/reflect/ClassPathTest.java +++ b/guava-tests/test/com/google/common/reflect/ClassPathTest.java @@ -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);