changeset 14664:c1d583efa466

Remove PackageInfo table, instead, use PackageEntry table for getSystemPackage(s)
author hseigel
date Wed, 09 Dec 2015 07:56:28 -0500
parents cc95060fced6
children 095faeceaa95
files src/java.base/share/classes/jdk/internal/misc/BootLoader.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/jdk/internal/misc/BootLoader.java	Tue Dec 08 13:16:32 2015 -0500
+++ b/src/java.base/share/classes/jdk/internal/misc/BootLoader.java	Wed Dec 09 07:56:28 2015 -0500
@@ -131,8 +131,8 @@
      * if the package has not been defined.
      */
     public static Package getDefinedPackage(String pn) {
-        String location = getSystemPackageLocation(pn.replace('.', '/').concat("/"));
-        if (location == null) {
+        String found = getSystemPackageLocation(pn.replace('.', '/'));
+        if (found == null) {
             return null;
         }
         return ClassLoaders.bootLoader().definePackage(pn);
@@ -144,7 +144,7 @@
     public static Stream<Package> packages() {
         return Arrays.stream(getSystemPackageNames())
             .map(name -> {
-                String pn = name.substring(0, name.length() - 1).replace('/', '.');
+                String pn = name.replace('/', '.');
                 return ClassLoaders.bootLoader().definePackage(pn);
             });
     }