Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fixed for null object hash value and string storage in object intern pool #646

Merged
merged 1 commit into from
Oct 19, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ public static int fieldHashCode(HollowObjectTypeDataAccess typeAccess, int ordin
}

public static int hashObject(Object value) {
if (value == null) {
return 0;
}
if(value instanceof Integer) {
return HollowReadFieldUtils.intHashCode((Integer)value);
} else if(value instanceof String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public long getLong(long pointer) {

public String getString(long pointer) {
ByteData byteData = ordinalMap.getByteData().getUnderlyingArray();
int length = byteData.get(pointer);
int length = VarInt.readVInt(byteData, pointer);
byte[] bytes = new byte[length];
for(int i=0;i<length;i++) {
bytes[i] = byteData.get(pointer+1+i);
Expand Down
Loading