8246729: MappedByteBuffer.force() throws IndexOutOfBoundsException

Brian Burkhalter brian.burkhalter at oracle.com
Mon Jun 8 17:57:43 UTC 2020


> On Jun 8, 2020, at 9:57 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> 
> +1
> Paul.
> 
>> On Jun 8, 2020, at 9:04 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>> 
>> For [1]  please review the proposed patch [2].


> On Jun 8, 2020, at 10:28 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> On 08/06/2020 17:04, Brian Burkhalter wrote:
>> For [1]  please review the proposed patch [2].
>> 
>> 
> Thanks for jumping on this one. The change looks good. If you want, test2 could use Files.createTempFile and that would avoid need to use file.toPath.


Will modify before pushing as shown below.

Thanks,

Brian

     private static void test2() throws Exception {
-        var file = File.createTempFile("test", null);
-        var channel = FileChannel.open(file.toPath(), READ, WRITE);
+        var path = Files.createTempFile("test", "map");
+        var channel = FileChannel.open(path, READ, WRITE);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200608/02bb33ed/attachment.htm>


More information about the nio-dev mailing list