< prev index next >

src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template

Print this page
rev 52907 : 8234841: Enhance buffering of byte buffers
Reviewed-by: alanb, ahgross, rhalade, psandoz

@@ -207,11 +207,10 @@
     }
 
     public $Type$Buffer slice() {
         int pos = this.position();
         int lim = this.limit();
-        assert (pos <= lim);
         int rem = (pos <= lim ? lim - pos : 0);
         int off = (pos << $LG_BYTES_PER_VALUE$);
         assert (off >= 0);
         return new Direct$Type$Buffer$RW$$BO$(this, -1, 0, rem, rem, off);
     }
< prev index next >