modules without classes
Alan Bateman
Alan.Bateman at oracle.com
Wed Nov 30 10:17:52 PST 2011
On 30/11/2011 17:05, Mandy Chung wrote:
>
> What is broken? jmod reindex?
>
> Before the refactoring, jpkg creates a jmod file with a CLASSES
> section even if there is no class in the module (I think it has the
> module-info.class in it). I fixed that bug to create the CLASSES
> section only if there is at least one class file in the module.
Yes, it's the reindexing as it assumes that the classes file exist.
Easily fixed with the attached and if you're okay with it then I'll push
it today so that the empty jdk.* modules can be installed. I'll also
check other areas in case we have similar assumptions (I found another
in the --strip-debug work).
-Alan
diff --git a/src/share/classes/org/openjdk/jigsaw/SimpleLibrary.java
b/src/share/classes/org/openjdk/jigsaw/SimpleLibrary.java
--- a/src/share/classes/org/openjdk/jigsaw/SimpleLibrary.java
+++ b/src/share/classes/org/openjdk/jigsaw/SimpleLibrary.java
@@ -778,7 +778,7 @@
addToIndex(ClassInfo.read(f), ix);
}
});
- } else {
+ } else if (cd.isFile()) {
FileInputStream fis = new FileInputStream(cd);
ZipInputStream zis = new ZipInputStream(fis);
ZipEntry ze;
More information about the jigsaw-dev
mailing list