Skip to content

Commit

Permalink
Adjust branch order.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebarlas committed Jan 4, 2024
1 parent ef23feb commit 9283575
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ private static Partition doProcessBuffer(ByteBuffer buffer, boolean first, Stats
while (buffer.hasRemaining()) {
var b = buffer.get();
if (readingKey) {
if (b == ';') {
if (b != ';') {
keyHash = HASH_FACTOR * keyHash + b;
keyBuf[keyPos++] = b;
} else {
var idx = keyHash & HASH_TBL_SIZE;
st = stats[idx];
if (st == null) { // nothing in table, eagerly claim spot
Expand All @@ -154,9 +157,6 @@ private static Partition doProcessBuffer(ByteBuffer buffer, boolean first, Stats
st = findInTable(stats, keyHash, keyBuf, keyPos);
}
readingKey = false;
} else {
keyHash = HASH_FACTOR * keyHash + b;
keyBuf[keyPos++] = b;
}
} else {
if (b == '\n') {
Expand Down

0 comments on commit 9283575

Please sign in to comment.