Skip to content

Commit 728ea1f

Browse files
committed
tidy code
1 parent 0c03d8a commit 728ea1f

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

lucene/core/src/java/org/apache/lucene/util/ByteBlockPool.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ public void readBytes(final long offset, final byte[] bytes, int bytesOffset, in
258258

259259
/**
260260
* Read a single byte at the given offset
261+
*
261262
* @param offset the offset to read
262263
* @return the byte
263264
*/

lucene/core/src/java/org/apache/lucene/util/fst/ByteBlockPoolReverseBytesReader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
*/
1717
package org.apache.lucene.util.fst;
1818

19-
import org.apache.lucene.util.ByteBlockPool;
20-
2119
import java.io.IOException;
20+
import org.apache.lucene.util.ByteBlockPool;
2221

2322
/** Reads in reverse from a ByteBlockPool. */
2423
final class ByteBlockPoolReverseBytesReader extends FST.BytesReader {

lucene/core/src/java/org/apache/lucene/util/fst/NodeHash.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ private long hash(FSTCompiler.UnCompiledNode<T> node) {
193193
// node!
194194
private long hash(long node) throws IOException {
195195
long offset = primaryTable.copiedOffsets.get(node).offset;
196-
FST.BytesReader in = new ByteBlockPoolReverseBytesReader(primaryTable.copiedNodes, node - offset);
196+
FST.BytesReader in =
197+
new ByteBlockPoolReverseBytesReader(primaryTable.copiedNodes, node - offset);
197198

198199
final int PRIME = 31;
199200

@@ -319,8 +320,10 @@ public byte[] getBytes(long index) {
319320
// here we need double copying
320321
OffsetAndLength offsetAndLength = copiedOffsets.get(index);
321322
byte[] bytes = new byte[offsetAndLength.length];
322-
// offset is the last offset of the node, hence subtract by (length - 1) to get the first offset
323-
copiedNodes.readBytes(offsetAndLength.offset - offsetAndLength.length + 1, bytes, 0, offsetAndLength.length);
323+
// offset is the last offset of the node, hence subtract by (length - 1) to get the first
324+
// offset
325+
copiedNodes.readBytes(
326+
offsetAndLength.offset - offsetAndLength.length + 1, bytes, 0, offsetAndLength.length);
324327
return bytes;
325328
}
326329

0 commit comments

Comments
 (0)