changeset 13516:1f5ee7f58331

Fix merge issues
author chegar
date Sat, 25 Jul 2015 16:50:07 +0100
parents 032ffa98a863
children be32e66cb27d
files src/java.base/share/classes/jdk/internal/jimage/decompressor/ResourceDecompressorFactory.java src/java.base/share/classes/module-info.java src/jdk.jlink/share/classes/jdk/tools/jimage/ExtractedImage.java
diffstat 3 files changed, 16 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/jdk/internal/jimage/decompressor/ResourceDecompressorFactory.java	Fri Jul 24 14:10:31 2015 +0100
+++ b/src/java.base/share/classes/jdk/internal/jimage/decompressor/ResourceDecompressorFactory.java	Sat Jul 25 16:50:07 2015 +0100
@@ -57,24 +57,3 @@
 
 }
 
-    }
-
-    /**
-     * The Factory arguments description.
-     * @return The arguments description.
-     */
-    public String getArgumentsDescription() {
-        return arguments;
-    }
-
-    /**
-     * To build a new decompressor.
-     * @param properties Contains configuration.
-     * @return A new decompressor.
-     * @throws IOException
-     */
-    public abstract ResourceDecompressor newDecompressor(Properties properties)
-            throws IOException;
-
-}
-
--- a/src/java.base/share/classes/module-info.java	Fri Jul 24 14:10:31 2015 +0100
+++ b/src/java.base/share/classes/module-info.java	Sat Jul 25 16:50:07 2015 +0100
@@ -139,6 +139,7 @@
     exports sun.net.spi.nameservice to
         jdk.naming.dns;
     exports sun.net.util to
+        java.desktop,
         jdk.jconsole,
         jdk.naming.dns;
     exports sun.net.www to
--- a/src/jdk.jlink/share/classes/jdk/tools/jimage/ExtractedImage.java	Fri Jul 24 14:10:31 2015 +0100
+++ b/src/jdk.jlink/share/classes/jdk/tools/jimage/ExtractedImage.java	Sat Jul 25 16:50:07 2015 +0100
@@ -41,9 +41,10 @@
 import java.util.function.Consumer;
 import java.util.stream.Stream;
 import jdk.internal.jimage.Archive;
-import jdk.internal.jimage.ImageFileCreator;
+import jdk.tools.jlink.internal.ImageFileCreator;
 import jdk.internal.jimage.ImageModuleData;
 import jdk.internal.jimage.ImageModuleDataWriter;
+import jdk.tools.jlink.internal.ImagePluginStack;
 
 /**
  *
@@ -91,6 +92,8 @@
             }
         }
 
+        private static final String MODULE_INFO = "module-info.class";
+
         private final Path dirPath;
         private final String moduleName;
         private final List<InputStream> open = new ArrayList<>();
@@ -102,7 +105,6 @@
             }
             chop = dirPath.toString().length() + 1;
             this.moduleName = dirPath.getFileName().toString();
-            System.out.println("Module name " + this.moduleName);
             this.dirPath = dirPath;
         }
 
@@ -113,11 +115,13 @@
 
         @Override
         public Stream<Entry> entries() {
+            Stream<Entry> ret = null;
             try {
-                return Files.walk(dirPath).map(this::toEntry).filter(n -> n != null);
-            } catch(IOException ex) {
+                ret = Files.walk(dirPath).map(this::toEntry).filter(n -> n != null);
+            } catch (IOException ex) {
                 throw new RuntimeException(ex);
             }
+            return ret;
         }
 
         private Archive.Entry toEntry(Path p) {
@@ -133,6 +137,9 @@
                 log.println(verboseName);
             }
 
+            if (name.equals(MODULE_INFO)) {
+                name = moduleName + "/" + MODULE_INFO;
+            }
             return new FileEntry(p, name);
         }
 
@@ -164,12 +171,14 @@
     private Set<Archive> archives = new HashSet<>();
     private final PrintWriter log;
     private final boolean verbose;
+    private final ImagePluginStack plugins;
 
-    ExtractedImage(Path dirPath, PrintWriter log,
+    ExtractedImage(Path dirPath, ImagePluginStack plugins, PrintWriter log,
             boolean verbose) throws IOException {
         if (!Files.isDirectory(dirPath)) {
             throw new IOException("Not a directory");
         }
+        this.plugins = plugins;
         Files.walk(dirPath, 1).forEach((p) -> {
             try {
                 if (!dirPath.equals(p)) {
@@ -201,7 +210,7 @@
 
     void recreateJImage(Path path) throws IOException {
 
-        ImageFileCreator.recreateJimage(path, archives, modulePackages);
+        ImageFileCreator.recreateJimage(path, archives, modulePackages, plugins);
     }
 
     private static String getPathName(Path path) {