mirror of
https://github.com/microsoft/HybridRow.git
synced 2026-01-27 05:13:16 +00:00
Tweaks
This commit is contained in:
@@ -77,7 +77,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.buffer = buffer.readerIndex(0); // required to ensure proper hashCode computation
|
this.buffer = buffer.readerIndex(0); // required to ensure proper hashCode computation by ByteBuf.hashCode
|
||||||
|
|
||||||
this.utf16String = Suppliers.memoize(() -> {
|
this.utf16String = Suppliers.memoize(() -> {
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable
|
|||||||
* @return {@code true} if the length of this instance is zero.
|
* @return {@code true} if the length of this instance is zero.
|
||||||
*/
|
*/
|
||||||
public final boolean isEmpty() {
|
public final boolean isEmpty() {
|
||||||
return this.buffer != null && this.buffer.writerIndex() == 0;
|
return this == EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -133,7 +133,7 @@ public final class Utf8String implements ByteBufHolder, CharSequence, Comparable
|
|||||||
* @return {@code true} if this instance is {@code null}.
|
* @return {@code true} if this instance is {@code null}.
|
||||||
*/
|
*/
|
||||||
public final boolean isNull() {
|
public final boolean isNull() {
|
||||||
return this.buffer == null;
|
return this == NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user