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:
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.
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 =
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'
> 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
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:
> 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
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'
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;
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
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
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
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
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:
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 =
>>>
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
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
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
18 matches
Mail list logo