Skip to content

Commit 505e0ab

Browse files
committed
fix
1 parent 212d73d commit 505e0ab

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

lucene/core/src/java/org/apache/lucene/search/DocScoreEncoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
* o.doc).reversed())}
3434
*
3535
* <p>Note that negative score is allowed but relationship between two codes encoded by negative
36-
* scores is undefined. The only thing guaranteed is codes encoded from negative score are smaller
37-
* than codes encoded from non-negative score.
36+
* scores is undefined. The only thing guaranteed is codes encoded from negative scores are smaller
37+
* than codes encoded from non-negative scores.
3838
*/
3939
class DocScoreEncoder {
4040

lucene/core/src/test/org/apache/lucene/search/TestDocScoreEncoder.java

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,20 @@ public void testRandom() {
3535
Float.intBitsToFloat(random().nextInt()),
3636
random().nextInt(Integer.MAX_VALUE),
3737
Float.intBitsToFloat(random().nextInt()),
38-
random().nextInt(Integer.MAX_VALUE)
39-
);
38+
random().nextInt(Integer.MAX_VALUE));
4039
}
4140
}
4241

4342
public void testSameDoc() {
4443
for (int i = 0; i < 1000; i++) {
4544
doAssert(
46-
Float.intBitsToFloat(random().nextInt()),
47-
1,
48-
Float.intBitsToFloat(random().nextInt()),
49-
1
50-
);
45+
Float.intBitsToFloat(random().nextInt()), 1, Float.intBitsToFloat(random().nextInt()), 1);
5146
}
5247
}
5348

5449
public void testSameScore() {
5550
for (int i = 0; i < 1000; i++) {
56-
doAssert(
57-
1f,
58-
random().nextInt(Integer.MAX_VALUE),
59-
1f,
60-
random().nextInt(Integer.MAX_VALUE)
61-
);
51+
doAssert(1f, random().nextInt(Integer.MAX_VALUE), 1f, random().nextInt(Integer.MAX_VALUE));
6252
}
6353
}
6454

0 commit comments

Comments
 (0)