From 670db5b6e80c120840ff3dd08adcc39582e4dfc1 Mon Sep 17 00:00:00 2001 From: Eduardo Ramirez Date: Fri, 25 Oct 2024 14:31:44 -0700 Subject: [PATCH] fix --- .../objectmapper/flatrecords/FlatRecordOrdinalReader.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hollow/src/main/java/com/netflix/hollow/core/write/objectmapper/flatrecords/FlatRecordOrdinalReader.java b/hollow/src/main/java/com/netflix/hollow/core/write/objectmapper/flatrecords/FlatRecordOrdinalReader.java index 4900778d5..16fe54682 100644 --- a/hollow/src/main/java/com/netflix/hollow/core/write/objectmapper/flatrecords/FlatRecordOrdinalReader.java +++ b/hollow/src/main/java/com/netflix/hollow/core/write/objectmapper/flatrecords/FlatRecordOrdinalReader.java @@ -207,11 +207,12 @@ public Boolean readFieldBoolean(int ordinal, String field) { } public Boolean readFieldBoolean(Offset offset) { - offset.increment(1); if (VarInt.readVNull(record.data, offset.get())) { + offset.increment(1); return null; } int value = record.data.get(offset.get()); + offset.increment(1); return value == 1 ? Boolean.TRUE : Boolean.FALSE; } @@ -272,8 +273,8 @@ public float readFieldFloat(int ordinal, String field) { } public float readFieldFloat(Offset offset) { - offset.increment(4); int value = record.data.readIntBits(offset.get()); + offset.increment(4); if (value == HollowObjectWriteRecord.NULL_FLOAT_BITS) { return Float.NaN; } @@ -295,8 +296,8 @@ public double readFieldDouble(int ordinal, String field) { } public double readFieldDouble(Offset offset) { - offset.increment(8); long value = record.data.readLongBits(offset.get()); + offset.increment(8); if (value == HollowObjectWriteRecord.NULL_DOUBLE_BITS) { return Double.NaN; }