RFR: 8231640: (prop) Canonical property storage [v17]
Jaikiran Pai
jai.forums2013 at gmail.com
Thu Sep 16 01:58:48 UTC 2021
On 15/09/21 9:48 pm, Daniel Fuchs wrote:
> On Wed, 15 Sep 2021 15:31:45 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>
>>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>>
>>> - Clarify how overriden Properties#entrySet() method impacts the order of stored properties
>>> - Tests to verify subclasses of Properties
>> src/java.base/share/classes/java/util/Properties.java line 850:
>>
>>> 848: * the {@code entrySet} method and return a different {@code Set} instance,
>>> 849: * then the property list is written out in the iteration order of
>>> 850: * that returned {@code Set}
>> Rewording a bit:
>>
>> "The keys and elements are written in the natural sort order of the keys in the `Properties.entrySet` unless `entrySet` is overridden by a subclass to return a different instance."
>>
>> "different instance" is a bit hard to implement given that entrySet() returns a new synchronized set each time.
>> typo: missing final "."
> yes - maybe we could work on the wording. Perhaps:
>> The keys and elements are written in the natural sort order of the keys in the Properties.entrySet unless entrySet is overridden by a subclass to return a different set implementation.
>
Daniel is right - my initial wording wasn't accurate and I couldn't find
a better term to express what I meant. Like Daniel notes above, I was
actually talking about using the private EntrySet implementation that
the Properties class uses to find out if some subclass overrode the
entrySet() method. I think Daniel's rewording of that javadoc section
above to state "different set implementation" is much more accurate than
my initial wording.
-Jaikiran
More information about the core-libs-dev
mailing list