changeset 14501:f1fff0daf868

Rename BootLoader::getPackage to getDefinedPackage
author mchung
date Thu, 19 Nov 2015 14:04:22 -0800
parents e6921b23f45b
children 89fb05b6e864
files src/java.base/share/classes/java/lang/ClassLoader.java src/java.base/share/classes/java/lang/Package.java src/java.base/share/classes/jdk/internal/misc/BootLoader.java
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Nov 19 14:03:44 2015 -0800
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Nov 19 14:04:22 2015 -0800
@@ -1905,7 +1905,7 @@
             if (parent != null) {
                 pkg = parent.getPackage(name);
             } else {
-                pkg = BootLoader.getPackage(name);
+                pkg = BootLoader.getDefinedPackage(name);
             }
         }
         return pkg;
--- a/src/java.base/share/classes/java/lang/Package.java	Thu Nov 19 14:03:44 2015 -0800
+++ b/src/java.base/share/classes/java/lang/Package.java	Thu Nov 19 14:04:22 2015 -0800
@@ -321,7 +321,7 @@
     @SuppressWarnings("deprecation")
     public static Package getPackage(String name) {
         ClassLoader l = ClassLoader.getClassLoader(Reflection.getCallerClass());
-        return l != null ? l.getPackage(name) : BootLoader.getPackage(name);
+        return l != null ? l.getPackage(name) : BootLoader.getDefinedPackage(name);
     }
 
     /**
--- a/src/java.base/share/classes/jdk/internal/misc/BootLoader.java	Thu Nov 19 14:03:44 2015 -0800
+++ b/src/java.base/share/classes/jdk/internal/misc/BootLoader.java	Thu Nov 19 14:04:22 2015 -0800
@@ -126,7 +126,7 @@
      * Returns the Package of the given name defined to the boot loader or null
      * if the package has not been defined.
      */
-    public static Package getPackage(String pn) {
+    public static Package getDefinedPackage(String pn) {
         String location = getSystemPackageLocation(pn.replace('.', '/').concat("/"));
         if (location == null) {
             return null;