RFR: 8264200: java/nio/channels/DatagramChannel/SRTest.java fails intermittently [v2]
Conor Cleary
ccleary at openjdk.java.net
Tue Apr 6 14:57:56 UTC 2021
On Tue, 6 Apr 2021 14:49:42 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Thanks Conor. Yes - we could work with byte arrays but strings are easier to print & log & more human friendly...
>
> ok, but please use getBytes(StandardCharsets.US_ASCII) to get the bytes avoiding ambiguity.
The most recent commit performs a static import of the charset with `import static java.nio.charset.StandardCharsets.US_ASCII;`. I feel that it is clear enough and keeps references to the Charset concise.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3354
More information about the nio-dev
mailing list