RFR: 2316: Prefer not to specify UTF-8 if it's used by default
Erik Joelsson
erikj at openjdk.org
Fri Jul 5 12:07:51 UTC 2024
On Fri, 5 Jul 2024 09:31:39 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
> Please review this clean-up. It's about not specifying UTF-8 encoding when it's the default, such as in `Files.{readString, writeString}`.
>
> The change is very uniform, except for two cases, where specifying the encoding was avoided by slightly more involved refactoring:
>
> * `JsonWriter:44`
> * `XML:42`
Looks good now that I understand the proposed change. Avoiding being explicit with UTF8 when it's actually the default is good. Then we only need to be explicit when using older APIs where the platform default is the default encoding.
-------------
Marked as reviewed by erikj (Lead).
PR Review: https://git.openjdk.org/skara/pull/1668#pullrequestreview-2160588567
More information about the skara-dev
mailing list