Review Request: JDK-8205623: Replace use of Class::getPackage with Class::getPackageName

mandy chung mandy.chung at oracle.com
Mon Jun 25 18:46:40 UTC 2018


This patch replaces the use of Class::getPackage with 
Class::getPackageName in jdk.internal.reflect.ReflectionFactory, 
sun.util.resources.BreakIteratorResourceBundle, and 
javax.xml.catalog.CatalogMessages.  Class::getPackageName avoids the 
overhead of constructing Package objects.

http://cr.openjdk.java.net/~mchung/jdk11/webrevs/8205623/webrev.00/

ReflectionFactory::packageEquals does not specify if the Class object is 
an array class.  In the current implementation it returns true even if 
the input parameters are both array classes but in two different runtime 
package.  I added an assert instead of retaining the current behavior.

Mandy


More information about the core-libs-dev mailing list