Use single character replace variant in Resources.toPackageName(String)
Alan Bateman
Alan.Bateman at oracle.com
Tue Jan 7 07:49:02 UTC 2020
On 07/01/2020 07:09, Ivan Gerasimov wrote:
> So, I filed a Jira bug:
>
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8236705
> WEBREV: http://cr.openjdk.java.net/~igerasim/8236705/00/webrev/
>
I added these source files in JDK 9, it was just an oversight that I
didn't use the single char replace. My guess is that the change
ModulePath deriveModuleDescriptor won't be noticeable in any real
benchmark. This method is deriving a module descriptor for a legacy JAR
file on the module path so it's scanning the contents of the JAR file
and all attributes in its main manifest. The Resources toPackageName
method is used more widely so it may help in a few cases. Anyway, this
change looks fine except the copyright year (you've changed it to 2019
rather than 2020).
-Alan
More information about the core-libs-dev
mailing list