RFR: 8351556: Optimize Location.locationFor/isModuleOrientedLocation [v2]
Chen Liang
liach at openjdk.org
Mon Mar 10 19:34:53 UTC 2025
On Mon, 10 Mar 2025 19:30:26 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Also direct properties test
>> - Touchups
>
> src/java.compiler/share/classes/javax/tools/StandardLocation.java line 119:
>
>> 117: private static final ConcurrentHashMap<String, Location> LOCATIONS = new ConcurrentHashMap<>();
>> 118:
>> 119: private static class LazyPatternHolder {
>
> Should we keep this as a local class in `computeIsModuleOrientedLocation` as it is only used in that method??
Even better, we can move this static utility `computeIsModuleOrientedLocation` into the `new Location` anonymous class and convert it to a local class; that way we define one fewer class as well.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23973#discussion_r1987903069
More information about the compiler-dev
mailing list