RFR: 8260265: UTF-8 by Default [v2]

Roger Riggs rriggs at openjdk.java.net
Wed Jul 14 21:09:15 UTC 2021


On Wed, 14 Jul 2021 20:53:34 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> src/java.base/share/classes/java/io/FileReader.java line 41:
>> 
>>> 39:  * @see InputStreamReader
>>> 40:  * @see FileInputStream
>>> 41:  * @see java.nio.charset.Charset#defaultCharset()
>> 
>> The @ see duplicates the link above, the javadoc can do without the @ see.
>
> If I remove that `@see`, I don't see the link in `See Also` section. Am I missing something?

In my view the @ linkplain is sufficient to allow the reader to navigate; but YMMV.

>> src/java.base/share/classes/java/lang/System.java line 802:
>> 
>>> 800:      * <tr><th scope="row">{@systemProperty file.encoding}</th>
>>> 801:      *     <td>The name of the default charset. Users may specify
>>> 802:      *     {@code UTF-8} or {@code COMPAT} on the command line to the value.
>> 
>> The wording could imply that only those two values can be supplied.
>> It could be rephrased to say that *if* the property is supplied on the command line
>> it overrides the default UTF-8.
>
> That was intentional. Only those two are supported, others continue to work as before (but not supported).

Still it leaves an uncomfortable feeling, perhaps remedied by an "other values have unspecified behavior"
or the "other values are implementation specific".

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

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


More information about the core-libs-dev mailing list