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 `
> `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 `
On Thu, 2 Feb 2023 15:44:54 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, 2 Feb 2023 15:44:54 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 `
On Thu, 2 Feb 2023 09:26:55 GMT, j3graham wrote:
>> We can but that entails special handling to ensure thread-safety. I will
>> provide such a solution. Thanks.
>
> If you need the thread-safety, perhaps sticking with `AtomicReferenceArray`
> is a simpler solution than the regular array one.
A
> `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 `
On Wed, 1 Feb 2023 20:19:20 GMT, cheenar wrote:
>> test/jdk/java/time/tck/java/time/zone/TCKFixedZoneRules.java line 141:
>>
>>> 139: @Test(dataProvider="rules")
>>> 140: public void test_isValidOffset_LDT_ZO(ZoneRules test, ZoneOffset
>>> expectedOffset) {
>>> 141: if (expected
On Wed, 1 Feb 2023 11:37:16 GMT, Per Minborg wrote:
>> src/java.base/share/classes/java/time/ZoneOffset.java line 147:
>>
>>> 145:
>>> 146: /** Cache of time-zone offset by offset in seconds [-18h, +18h]
>>> for each even quarter of an hour. */
>>> 147: private static final AtomicRefer
On Wed, 1 Feb 2023 20:16:56 GMT, cheenar wrote:
>> Per Minborg has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Simplify benchmark
>> - Add benchmark
>
> test/jdk/java/time/tck/java/time/zone/TCKFixedZoneRules.java line 141:
>
>> 139:
On Wed, 1 Feb 2023 13:18:31 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 Wed, 1 Feb 2023 13:18:31 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 Wed, 1 Feb 2023 13:18:31 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 `
> `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 `
On Wed, 1 Feb 2023 07:58:02 GMT, Andrey Turbanov wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Rework using a regular array and acquire/release semantics
>
> src/java.base/share/classes/java/time/ZoneOffset.java l
> `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 `
On Tue, 31 Jan 2023 15:57:43 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 `ConcurrentHashM
On Tue, 31 Jan 2023 16:02:07 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 `Concurrent
On Tue, 31 Jan 2023 15:57:43 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 `ConcurrentHashM
`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 `AtomicRefere
33 matches
Mail list logo