Re: RFR: 8316557: Make fields final in 'sun.util' package [v3]

2023-11-17 Thread Naoto Sato
On Thu, 16 Nov 2023 18:11:48 GMT, Andrey Turbanov wrote: >> A few classes in `sun.util` package have non-final fields which could easily >> be marked `final`. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8316557:

Re: RFR: 8316557: Make fields final in 'sun.util' package [v2]

2023-11-17 Thread Naoto Sato
On Fri, 17 Nov 2023 08:38:37 GMT, Andrey Turbanov wrote: >> The map contains several entries so I think the plural form is appropriate >> here. > > Current naming highlights the difference in values in this maps: > `FIRST_DAY_OF_WEEK` vs `MINIMAL_DAYS_IN_FIRST_WEEK`. > I like this approach.

Re: RFR: 8316557: Make fields final in 'sun.util' package [v2]

2023-11-17 Thread Andrey Turbanov
On Fri, 17 Nov 2023 08:13:05 GMT, Per Minborg wrote: >> src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java >> line 48: >> >>> 46: public class CLDRCalendarDataProviderImpl extends >>> CalendarDataProviderImpl { >>> 47: >>> 48: private static final Map firstDays =

Re: RFR: 8316557: Make fields final in 'sun.util' package [v2]

2023-11-17 Thread Per Minborg
On Thu, 16 Nov 2023 17:08:58 GMT, Naoto Sato 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'

Re: RFR: 8316557: Make fields final in 'sun.util' package [v3]

2023-11-16 Thread Andrey Turbanov
> A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8316557: Make fields final in 'sun.util' package "First Day" is the first

Re: RFR: 8316557: Make fields final in 'sun.util' package [v2]

2023-11-16 Thread Naoto Sato
On Thu, 16 Nov 2023 08:56:05 GMT, Andrey Turbanov wrote: >> A few classes in `sun.util` package have non-final fields which could easily >> be marked `final`. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8316557:

Re: RFR: 8316557: Make fields final in 'sun.util' package [v2]

2023-11-16 Thread Andrey Turbanov
> A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. 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

Re: RFR: 8316557: Make fields final in 'sun.util' package [v2]

2023-11-16 Thread Andrey Turbanov
On Mon, 13 Nov 2023 11:40:27 GMT, Per Minborg 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'

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-11-13 Thread Per Minborg
On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. LGTM. See comments though. src/java.base/share/classes/sun/util/locale/StringTokenIterator.java line 33: > 31: package sun.util.locale;

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-11-13 Thread Per Minborg
On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java line 48: > 46: public class CLDRCalendarDataProviderImpl

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-11-12 Thread Andrey Turbanov
On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. Can I get a review? - PR Comment: https://git.openjdk.org/jdk/pull/15736#issuecomment-1807066050

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Alan Bateman
On Mon, 25 Sep 2023 10:04:13 GMT, Chen Liang wrote: >>> UTF8 decoder does not perform any internal state mutation during decoding; >> >> Are you sure? I think `CharsetDecoder::decode` will modify the `status` >> field. > > right, it does have a `state` field. CharsetDecoder is specified to

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Chen Liang
On Mon, 25 Sep 2023 09:53:47 GMT, Glavo wrote: >> UTF8 decoder does not perform any internal state mutation during decoding; >> in addition, if this field is static final, the decoder's error actions are >> published when the class is initialized, while publishing in a final field >> does not

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Glavo
On Mon, 25 Sep 2023 09:47:15 GMT, Chen Liang wrote: > UTF8 decoder does not perform any internal state mutation during decoding; Are you sure? I think `CharsetDecoder::decode` will modify the `status` field. - PR Review Comment:

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Chen Liang
On Mon, 25 Sep 2023 09:40:00 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java line >> 71: >> >>> 69: private final class PropertiesFileDecoder extends CharsetDecoder { >>> 70: >>> 71: private final CharsetDecoder cdUTF_8 = >>>

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Andrey Turbanov
On Mon, 18 Sep 2023 14:41:14 GMT, Chen Liang wrote: >> A few classes in `sun.util` package have non-final fields which could easily >> be marked `final`. > > src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java line > 71: > >> 69: private final class

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-19 Thread Chen Liang
On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java line 71: > 69: private final class PropertiesFileDecoder

RFR: 8316557: Make fields final in 'sun.util' package

2023-09-19 Thread Andrey Turbanov
A few classes in `sun.util` package have non-final fields which could easily be marked `final`. - Commit messages: - [PATCH] Make fields final in 'sun.util' package Changes: https://git.openjdk.org/jdk/pull/15736/files Webrev: https://webrevs.openjdk.org/?repo=jdk=15736=00