On Mon, 6 Jun 2022 13:28:44 GMT, Сергей Цыпанов wrote:
>> src/java.base/share/classes/java/util/Locale.java line 2260:
>>
>>> 2258: * Calculated hashcode
>>> 2259: */
>>> 2260: private transient volatile int hashCodeValue;
>>
>> We can additionally annotate such cache fields with
On Mon, 6 Jun 2022 13:32:21 GMT, liach wrote:
>> Shouldn't the fields annotated with `@Stable` be `final` as well?
>
> These fields can only be written once besides the default values, but they
> don't have to be written in the static initializer or constructor. So whe
On Mon, 6 Jun 2022 12:58:39 GMT, Сергей Цыпанов wrote:
> - cached hash code of `Locale` and `Locale$LanguageRange` shouldn't be
> volatile, even in case of race in the worst case it is recalculated at most
> once per thread
> - `defaultLocale` field is read multiple times in `initDefault()`
> -
On Wed, 2 Jun 2021 14:10:38 GMT, Сергей Цыпанов
wrote:
> There is a few JDK classes duplicating the contents of Long.hashCode() for
> hash code calculation. They should explicitly delegate to Long.hashCode().
src/java.base/share/classes/java/lang/Double.java line 881:
> 879: public static
On Mon, 24 May 2021 10:13:55 GMT, Сергей Цыпанов
wrote:
>> But don't people access these internal code at their own risk, as jdk may
>> change these code at any time without notice?
>
> True, I just wonder whether it's OK to change internals when we know for sure
> that this breaks 3rd party c
On Mon, 24 May 2021 07:13:29 GMT, Сергей Цыпанов
wrote:
>> Just for completeness, they're using the add-exports:
>> https://github.com/AdoptOpenJDK/IcedTea-Web/blob/master/launchers/itw-modularjdk.args#L19
>
> Should we then revert the changes to `JarIndex`?
But don't people access these intern
On Sun, 14 Mar 2021 14:58:11 GMT, Yi Yang wrote:
>> The usage of `LinkedList` is senseless and can be replaced with either
>> `ArrayList` or `ArrayDeque` which are both more compact and effective.
>>
>> jdk:tier1 and jdk:tier2 are both ok
>
> src/java.base/share/classes/jdk/internal/loader/URLC
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов
wrote:
> The usage of `LinkedList` is senseless and can be replaced with either
> `ArrayList` or `ArrayDeque` which are both more compact and effective.
>
> jdk:tier1 and jdk:tier2 are both ok
Are linked lists worse for addition even in cases w