8245121: (bf) XBuffer.put(Xbuffer src) can give unexpected result when storage overlaps
Brian Burkhalter
brian.burkhalter at oracle.com
Fri May 29 19:11:18 UTC 2020
> On May 29, 2020, at 9:25 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
>
> I have one other request and one comment, both of which you can choose to ignore if you wanna wrap this up.
>
> - change the implementations of MyRandom.next$Type to use next(<size-of-type-in-bits>) rather than your use your own shifting logic.
>
> - typeToAttr can be constructed using Map.of:
> Map.of(
> byte.class, TypeAttr.of(ByteBuffer.class, Byte.BYTES, “Byte”),
> char.class, …
> …,
> )
> In fact TypeAttr really really wants to be a record (nominal tuple).
Here’s an updated version which addresses all of the above points:
http://cr.openjdk.java.net/~bpb/8245121/webrev.05/
> I believe we can use preview features in tests, and it is worthwhile to do so (gaining more coverage).
Yes one can use preview features provided the following tags are in the test header:
* @compile --enable-preview -source ${jdk.version} <TestClass>.java
* @run testng/othervm --enable-preview <TestClass>
The “—enable-preview” option requires “othervm."
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200529/13c37d78/attachment.htm>
More information about the nio-dev
mailing list