RFR: 8241294: Examine input checking in ClassLoader::package_from_class_name

Claes Redestad claes.redestad at oracle.com
Fri Mar 27 13:55:45 UTC 2020


Hi,

in ClassLoader::package_from_class_name, testing if the class name input
is NULL is redundant, and testing for and skipping ['s is wrong, since
fully qualified array class names doesn't start with [.

We can also get rid of the bad_class_name parameter, and move
the complexity of that checking to the only call site that distinguishes
between an empty package NULL and a bad class name NULL

Webrev: http://cr.openjdk.java.net/~redestad/8241294/open.00/
Bug:    https://bugs.openjdk.java.net/browse/JDK-8241294

Testing: tier1-4 (ongoing)

Thanks!

/Claes


More information about the hotspot-runtime-dev mailing list