[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-nio-dev
Subject:    Re: 8245121: (bf) XBuffer.put(Xbuffer src) can give unexpected result when storage overlaps
From:       Paul Sandoz <paul.sandoz () oracle ! com>
Date:       2020-05-29 19:18:04
Message-ID: C1C105ED-3531-40F5-BD0D-B3E43E30C33A () oracle ! com
[Download RAW message or body]

Very nice +1
Paul.

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


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
line-break: after-white-space;" class="">Very nice +1<div class="">Paul.<br \
class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 29, \
2020, at 12:11 PM, Brian Burkhalter &lt;<a href="mailto:brian.burkhalter@oracle.com" \
class="">brian.burkhalter@oracle.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" \
content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; \
-webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div \
class=""><blockquote type="cite" class=""><div class="">On May 29, 2020, at 9:25 AM, \
Paul Sandoz &lt;<a href="mailto:paul.sandoz@oracle.com" \
class="">paul.sandoz@oracle.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><div class="" style="caret-color: \
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;">I have one other request \
and one comment, both of which you can choose to ignore if you wanna wrap this \
up.</div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;"><br class=""></div><div class="" style="caret-color: rgb(0, \
0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;">- change the \
implementations of MyRandom.next$Type to use next(&lt;size-of-type-in-bits&gt;) \
rather than your use your own shifting logic.</div><div class="" style="caret-color: \
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><div \
class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: \
none;">-&nbsp;<span class="" style="orphans: 2; widows: 2;">typeToAttr can be \
constructed using Map.of:</span></div><div class="" style="caret-color: rgb(0, 0, 0); \
font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: \
normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: \
0px; text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none;"><div class="" style="orphans: \
2; widows: 2;">&nbsp; Map.of(</div><div class="" style="orphans: 2; widows: \
2;">&nbsp; &nbsp; byte.class, TypeAttr.of(ByteBuffer.class, Byte.BYTES, \
"Byte"),</div><div class="" style="orphans: 2; widows: 2;">&nbsp; &nbsp; char.class, \
…</div><div class="" style="orphans: 2; widows: 2;">&nbsp; &nbsp; …,</div><div \
class="" style="orphans: 2; widows: 2;">&nbsp; \
)</div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div \
class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: \
none;"><div class="" style="orphans: 2; widows: 2;">In fact&nbsp;<span class="" \
style="orphans: 2; widows: 2;">TypeAttr really really wants to be a record (nominal \
tuple).</span></div></div></div></blockquote><div class=""><br class=""></div><div \
class="">Here's an updated version which addresses all of the above points:</div><div \
class=""><br class=""></div><div class=""><a \
href="http://cr.openjdk.java.net/~bpb/8245121/webrev.05/" \
class="">http://cr.openjdk.java.net/~bpb/8245121/webrev.05/</a></div><br \
class=""><blockquote type="cite" class=""><div \
class=""></div></blockquote><blockquote type="cite" class=""><div class=""><div \
class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: \
none;"><div class="" style="orphans: 2; widows: 2;"><span class="" style="orphans: 2; \
widows: 2;">I&nbsp;believe we can use preview features in tests, and it is worthwhile \
to do so (gaining more coverage).</span></div></div></div></blockquote></div><br \
class=""><div class="">Yes one can use preview features provided the following tags \
are in the test header:</div><div class=""><br class=""></div><div class=""><div \
class="">&nbsp;* @compile --enable-preview -source ${jdk.version} \
&lt;TestClass&gt;.java</div><div class="">&nbsp;* @run testng/othervm \
--enable-preview &lt;TestClass&gt;</div></div><div class=""><br class=""></div><div \
class="">The "—enable-preview" option requires "othervm."</div><div class=""><br \
class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div \
class="">Brian</div></div></div></blockquote></div><br class=""></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic