8258955: (bf) slice(int, int) on view buffers fails to adjust index according to primitive size

Reviewed-by: alanb
This commit is contained in:
Chris Hegarty 2021-01-02 19:29:50 +00:00
parent 881bceb9a3
commit 73f5415363
2 changed files with 35 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -237,7 +237,8 @@ class Direct$Type$Buffer$RW$$BO$
0,
length,
length,
index, segment);
index << $LG_BYTES_PER_VALUE$,
segment);
}
public $Type$Buffer duplicate() {