On 25/06/2018 19:46, mandy chung wrote:
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.
BreakIteratorResourceBundler and CatalogMessages look okay.

For ReflectionFactory.packageEquals then it might be cleaner to put the assert first but what you have is okay too.

-Alan

Reply via email to