Review request 8132297: JDK9 build.tools.module.ImageBuilder does not filter out .class.bc files

Mandy Chung mandy.chung at oracle.com
Mon Oct 5 22:32:25 UTC 2015


JDK 9 currently use a build tool (ImageBuilder) to create the JDK modular image.  A in-house tool doing static analysis generates additional files that should be excluded in the image.

jlink and jmod tool in jake build has the option to exclude specific files.

This patch proposes to fix the interim ImageBuilder to exclude files with .bc suffix as a temporary workaround.

Mandy

diff --git a/make/src/classes/build/tools/module/ModuleArchive.java b/make/src/classes/build/tools/module/ModuleArchive.java
--- a/make/src/classes/build/tools/module/ModuleArchive.java
+++ b/make/src/classes/build/tools/module/ModuleArchive.java
@@ -105,6 +105,7 @@
                     entries.addAll(stream
                             .filter(p -> !Files.isDirectory(p)
                                     && !classes.relativize(p).toString().startsWith("_the.")
+                                    && !classes.relativize(p).toString().endsWith(".bc")
                                     && !classes.relativize(p).toString().equals("javac_state"))
                             .sorted()
                             .map(p -> toEntry(p, classes, EntryType.CLASS_OR_RESOURCE))


More information about the jigsaw-dev mailing list