RFR: 8360575: java.util.Properties.list() methods trim each value to 37 characters in the listed output [v4]

Roger Riggs rriggs at openjdk.org
Mon Jul 14 17:08:43 UTC 2025


On Sun, 13 Jul 2025 14:20:22 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Alan's review - no need to state the number of characters
>
> src/java.base/share/classes/java/util/Properties.java line 1260:
> 
>> 1258:      *      PrintWriter out = ...
>> 1259:      *      // list the properties to PrintWriter
>> 1260:      *      p.forEach((k, v) -> out.println(k + "=" + v));
> 
> Should our example recommend using `toString` as a utility to obtain a debug string instead, as it performs no truncation?

Using `toString()` will be harder to read; as proposed each property is on a separate line.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26018#discussion_r2205406016


More information about the core-libs-dev mailing list