8208362: (bf) Long chains created by direct Buffer::slice

Reviewed-by: mr, psandoz, alanb
This commit is contained in:
Florian Weimer 2018-08-06 14:55:04 -07:00
parent 4bac00436d
commit cc248634a1
2 changed files with 113 additions and 1 deletions

View file

@ -194,7 +194,8 @@ class Direct$Type$Buffer$RW$$BO$
#if[byte]
cleaner = null;
#end[byte]
att = db;
Object attachment = db.attachment();
att = (attachment == null ? db : attachment);
#else[rw]
super(db, mark, pos, lim, cap, off);
this.isReadOnly = true;