Re-examine ClassLoader.getPackage(s) methods
Alan Bateman
Alan.Bateman at oracle.com
Sun Sep 27 08:29:08 UTC 2015
On 26/09/2015 19:28, Mandy Chung wrote:
>> On Sep 26, 2015, at 7:33 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>> This looks good. I think I would lean more to deprecating getPackage as just too fragile and leads to difficult to diagnose bugs.
> Are you also suggesting to deprecate ClassLoader::getPackages as well?
>
The ordering of the elements in the array returned by CL::getPackages is
not specified so I think that is okay. However CL#getPackage(String) is
a significant hazard as the @apiNote explains so I think it could be a
candidate to deprecate.
-Alan.
More information about the jigsaw-dev
mailing list