On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote:
>> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for
>> values in the range [-18h, 18h] for each second that is on an even quarter
>> of an hour (i.e. at most 2*18*4+1 = 145 values).
>>
>> Instead of using a `ConcurrentH
On Tue, 21 Mar 2023 13:53:27 GMT, Chen Liang wrote:
>> It is possible but this keeps the mapper more local and only accessible
>> where it is supposed to be used. For testing purposed, it might be better to
>> have the class as you propose.
>
> If we want it local, I suppose we can convert the
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote:
>> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for
>> values in the range [-18h, 18h] for each second that is on an even quarter
>> of an hour (i.e. at most 2*18*4+1 = 145 values).
>>
>> Instead of using a `ConcurrentH
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote:
>> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for
>> values in the range [-18h, 18h] for each second that is on an even quarter
>> of an hour (i.e. at most 2*18*4+1 = 145 values).
>>
>> Instead of using a `ConcurrentH
On Tue, 21 Mar 2023 07:25:38 GMT, Per Minborg wrote:
>> src/java.base/share/classes/java/time/ZoneOffset.java line 430:
>>
>>> 428: public static ZoneOffset ofTotalSeconds(int totalSeconds) {
>>> 429: final class Holder {
>>> 430: private static final IntFunction
>>> ZON
On Tue, 21 Mar 2023 07:29:49 GMT, Per Minborg wrote:
>> It can. I think either works fine. Maybe a bit nicer with a method reference
>> as you propose.
>
> Perhaps you mean the method could be *replaced* with `Integer::valueOf"? Good
> suggestion.
Yes, `Integer::valueOf` is a better replacemen
On Mon, 20 Mar 2023 18:12:01 GMT, Chen Liang wrote:
>> Per Minborg has updated the pull request incrementally with three additional
>> commits since the last revision:
>>
>> - Remove unused setup method
>> - Rename method in test
>> - Add copyright header
>
> src/java.base/share/classes/java
On Tue, 21 Mar 2023 07:27:59 GMT, Per Minborg wrote:
>> test/jdk/jdk/internal/util/LazyReferenceArray/BasicLazyReferenceArrayTest.java
>> line 107:
>>
>>> 105:
>>> 106: private static IntFunction intIdentity() {
>>> 107: return i -> i;
>>
>> Can't this be `Integer::valueOf`?
>
> I
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote:
>> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for
>> values in the range [-18h, 18h] for each second that is on an even quarter
>> of an hour (i.e. at most 2*18*4+1 = 145 values).
>>
>> Instead of using a `ConcurrentH
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote:
>> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for
>> values in the range [-18h, 18h] for each second that is on an even quarter
>> of an hour (i.e. at most 2*18*4+1 = 145 values).
>>
>> Instead of using a `ConcurrentH
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote:
>> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for
>> values in the range [-18h, 18h] for each second that is on an even quarter
>> of an hour (i.e. at most 2*18*4+1 = 145 values).
>>
>> Instead of using a `ConcurrentH
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote:
>> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for
>> values in the range [-18h, 18h] for each second that is on an even quarter
>> of an hour (i.e. at most 2*18*4+1 = 145 values).
>>
>> Instead of using a `ConcurrentH
> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for values
> in the range [-18h, 18h] for each second that is on an even quarter of an
> hour (i.e. at most 2*18*4+1 = 145 values).
>
> Instead of using a `ConcurrentHashMap` for caching instanced, we could
> instead use an `
13 matches
Mail list logo