What is the effect of shifting an integer zero?
I just noticed this in DirectByteBuffer.slice () :
public ByteBuffer slice() {
int pos = this.position();
int lim = this.limit();
assert (pos <= lim);
int rem = (pos <= lim ? lim - pos : 0);
int off = (pos << 0); // <---- what does this do
assert (off >= 0);
return new DirectByteBuffer(this, -1, 0, rem, rem, off);
}
what is the shift point of the int from the left by 0?
+3
source to share