RFR: 8231640: (prop) Canonical property storage [v13]

Jaikiran Pai jpai at openjdk.java.net
Tue Sep 14 13:22:55 UTC 2021


On Tue, 14 Sep 2021 11:43:25 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   unused imports
>
> src/java.base/share/classes/java/util/Properties.java line 828:
> 
>> 826:      * a comment line is written as follows.
>> 827:      * First, a {@code #} character is written, followed by the contents
>> 828:      * of the property, followed by a line separator.
> 
> Maybe you should refer to how the comment is written out above, since you use the same method. The spec changes as written above does not specify how newlines in the property would be handled (which is possible to get, I believe, even if it means an intricate command line escape dance)

Hello Magnus, 
> Maybe you should refer to how the comment is written out above, since you use the same method. 

I've updated the javadoc to capture this part of the detail.
> The spec changes as written above does not specify how newlines in the property would be handled (which is possible to get, I believe, even if it means an intricate command line escape dance)

The new tests that were added in this PR has one specific test to verify how line terminators are dealt with, if the system property value has them https://github.com/openjdk/jdk/pull/5372/files#diff-220f7bcc6d1a7ec33764f81eb95ccb0f69444e1eb923b015025e2140c3ffe145R280

-------------

PR: https://git.openjdk.java.net/jdk/pull/5372


More information about the core-libs-dev mailing list