Inconsistency between ClassDesc::packageName and Class::getPackageName
Kasper Nielsen
kasperni at gmail.com
Mon Aug 22 09:17:48 UTC 2022
Hi,
I was playing around with java.lang.constant and found an inconsistency between
ClassDesc::packageName and Class::getPackageName as outlined in the table below.
Specifically dealing with primitive and array types.
Class ClassDesc::packageName Class::getPackage Class::getPackageName
---------- ---------------------- ----------------- ---------------------
int "" null "java.lang"
int[] "" null "java.lang"
Integer "java.lang" java.lang "java.lang"
Integer[] "" null "java.lang"
I was originally going to submit a patch for ClassDesc. But I now think
Class::getPackageName is the one that I need to patch. Thoughts?
Thanks,
Kasper
More information about the core-libs-dev
mailing list