8245121: (bf) XBuffer.put(Xbuffer src) can give unexpected result when storage overlaps

Paul Sandoz paul.sandoz at oracle.com
Fri May 29 19:18:04 UTC 2020


Very nice +1
Paul.

> On May 29, 2020, at 12:11 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> 
> 
>> On May 29, 2020, at 9:25 AM, Paul Sandoz <paul.sandoz at oracle.com <mailto: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/ <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/f5bcdde3/attachment-0001.htm>


More information about the nio-dev mailing list