RFR: JDK-8139820: URLClassPath.FileLoader constructor redundantly checks protocol
Evgeny Mandrikov
mandrikov at gmail.com
Tue Aug 20 00:52:10 UTC 2019
On Mon, Aug 19, 2019 at 12:17 AM Claes Redestad <claes.redestad at oracle.com>
wrote:
> I'd add a comment that protocol is assumed to be "file",
URLClassPath.FileLoader class already has a comment "from a file URL that
refers to a directory",
but anyway added comment for constructor.
and perhaps make the constructor private (valid since JDK 11).
>
If I'm not mistaken, then this was valid even before Java 11 with
difference that now compiler does not need to add additional synthetic
constructor into bytecode thanks to nestmates in Java 11.
Or do you mean that OpenJDK codebase was avoiding these synthetic
constructors?
By analogy for consistency also made JarLoader private.
I can sponsor the change, seeing how I apperently filed and then
> completely forgot about this cleanup.. :-)
>
Thank you for review and sponsoring!
Updated patch - http://cr.openjdk.java.net/~godin/8139820/webrev.01/
tier1 tests pass on my machine.
Regards,
Evgeny
More information about the core-libs-dev
mailing list