changeset 14220:7211ac32411a

ModuleInfo does not need temporary set when parsing ConcealedPackages attribute
author alanb
date Thu, 15 Oct 2015 08:14:43 +0100
parents a0cd5da340dc
children d79e9bf2bd4e
files src/java.base/share/classes/java/lang/module/ModuleInfo.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/module/ModuleInfo.java	Thu Oct 15 08:13:17 2015 +0100
+++ b/src/java.base/share/classes/java/lang/module/ModuleInfo.java	Thu Oct 15 08:14:43 2015 +0100
@@ -351,13 +351,11 @@
         throws IOException
     {
         int package_count = in.readUnsignedShort();
-        Set<String> packages = new HashSet<>(package_count);
         for (int i=0; i<package_count; i++) {
             int index = in.readUnsignedShort();
-            String pkg = cpool.getUtf8(index).replace('/', '.');
-            packages.add(pkg);
+            String pn = cpool.getUtf8(index).replace('/', '.');
+            builder.conceals(pn);
         }
-        builder.conceals(packages);
     }
 
     /**