On Mon, 13 Nov 2023 11:40:27 GMT, Per Minborg <pminb...@openjdk.org> wrote:

>> Andrey Turbanov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   8316557: Make fields final in 'sun.util' package
>>   
>>   rename 'firstDay' to 'firstDays' to match 'minDays' naming
>
> src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java 
> line 48:
> 
>> 46: public class CLDRCalendarDataProviderImpl extends 
>> CalendarDataProviderImpl {
>> 47: 
>> 48:     private static final Map<String, Integer> firstDay = new 
>> ConcurrentHashMap<>();
> 
> We might rename these fields to FIRST_DAY etc.

Hm. Usually CAPS naming is used only on immutable constants, but here we have 
mutable field. (See google style guide for example - 
https://google.github.io/styleguide/javaguide.html#s5.2.4-constant-names).
I like old naming approach.

> src/java.base/share/classes/sun/util/locale/LocaleObjectCache.java line 102:
> 
>> 100:     }
>> 101: 
>> 102:     private static class CacheEntry<K, V> extends SoftReference<V> {
> 
> The class itself might be `final`

I think making classes `final` is out of scope of this PR.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1395350055
PR Review Comment: https://git.openjdk.org/jdk/pull/15736#discussion_r1395351993

Reply via email to