Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions buffer/src/main/java/io/netty/buffer/AbstractByteBuf.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public abstract class AbstractByteBuf extends ByteBuf {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(AbstractByteBuf.class);
private static final String LEGACY_PROP_CHECK_ACCESSIBLE = "io.netty.buffer.bytebuf.checkAccessible";
private static final String PROP_CHECK_ACCESSIBLE = "io.netty.buffer.checkAccessible";
private static final boolean checkAccessible;
static final boolean checkAccessible; // accessed from CompositeByteBuf
private static final String PROP_CHECK_BOUNDS = "io.netty.buffer.checkBounds";
private static final boolean checkBounds;

Expand Down Expand Up @@ -332,12 +332,12 @@ public int ensureWritable(int minWritableBytes, boolean force) {

@Override
public ByteBuf order(ByteOrder endianness) {
if (endianness == null) {
throw new NullPointerException("endianness");
}
if (endianness == order()) {
return this;
}
if (endianness == null) {
throw new NullPointerException("endianness");
}
return newSwappedByteBuf();
}

Expand Down Expand Up @@ -1293,7 +1293,7 @@ public int forEachByte(int index, int length, ByteProcessor processor) {
}
}

private int forEachByteAsc0(int start, int end, ByteProcessor processor) throws Exception {
int forEachByteAsc0(int start, int end, ByteProcessor processor) throws Exception {
for (; start < end; ++start) {
if (!processor.process(_getByte(start))) {
return start;
Expand Down Expand Up @@ -1325,7 +1325,7 @@ public int forEachByteDesc(int index, int length, ByteProcessor processor) {
}
}

private int forEachByteDesc0(int rStart, final int rEnd, ByteProcessor processor) throws Exception {
int forEachByteDesc0(int rStart, final int rEnd, ByteProcessor processor) throws Exception {
for (; rStart >= rEnd; --rStart) {
if (!processor.process(_getByte(rStart))) {
return rStart;
Expand Down
Loading