mirror of https://github.com/apache/lucene.git
in BytesRefHash constructor avoid duplicate BytesStartArray.bytesUsed() call (#13032)
This commit is contained in:
parent
e5bceb4086
commit
bff5ac0ed0
|
@ -79,8 +79,8 @@ public final class BytesRefHash implements Accountable {
|
|||
Arrays.fill(ids, -1);
|
||||
this.bytesStartArray = bytesStartArray;
|
||||
bytesStart = bytesStartArray.init();
|
||||
bytesUsed =
|
||||
bytesStartArray.bytesUsed() == null ? Counter.newCounter() : bytesStartArray.bytesUsed();
|
||||
final Counter bytesUsed = bytesStartArray.bytesUsed();
|
||||
this.bytesUsed = bytesUsed == null ? Counter.newCounter() : bytesUsed;
|
||||
bytesUsed.addAndGet(hashSize * (long) Integer.BYTES);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue