RFR: 8231640: (prop) Canonical property storage [v2]
Robert Scholte
github.com+150992+rfscholte at openjdk.java.net
Tue Sep 7 17:54:37 UTC 2021
On Sat, 4 Sep 2021 18:30:06 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> use @implNote to explain the use of the environment variable
>
> src/java.base/share/classes/java/util/Properties.java line 924:
>
>> 922: writeDateComment(bw);
>> 923: synchronized (this) {
>> 924: for (Map.Entry<Object, Object> e : new TreeMap<>(map).entrySet()) {
>
> Is this sorting intentionally added? It's not clear from issue description or PR description that order of properties should be changed too.
> Anyway I think copying `entrySet()` to array and then sorting should be faster, than creating a TreeMap
In case of reproducibility it should be at least ordered, i.e. keep original input order.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5372
More information about the core-libs-dev
mailing list