8153317: Two jimage tests have been failing since JDK-8152641 was fixed
authorredestad
Fri, 01 Apr 2016 22:47:30 +0200
changeset 36758 624c185a6e0f
parent 36757 c859c6feee56
child 36759 07dc1868fd1e
8153317: Two jimage tests have been failing since JDK-8152641 was fixed Reviewed-by: darcy
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Fri Apr 01 20:28:03 2016 +0200
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Fri Apr 01 22:47:30 2016 +0200
@@ -158,7 +158,9 @@
                 out.add(data);
                 speciesTypes.forEach(types -> generateConcreteClass(types, data, out));
             } else {
-                out.add(data);
+                if (!out.contains(data)) {
+                    out.add(data);
+                }
             }
         }
     }
@@ -177,7 +179,9 @@
                     "/java.base/" + className + ".class",
                     Pool.ModuleDataType.CLASS_OR_RESOURCE,
                     new ByteArrayInputStream(bytes), bytes.length);
-            out.add(ndata);
+            if (!out.contains(ndata)) {
+                out.add(ndata);
+            }
         } catch (Exception ex) {
             throw new PluginException(ex);
         }