Skip to content

Commit a153599

Browse files
committed
Resolved checkstyle issues
1 parent 3743e5b commit a153599

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

x-pack/plugin/rank-rrf/src/main/java/org/elasticsearch/xpack/rank/linear/L2ScoreNormalizer.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2+
/*
3+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4+
* or more contributor license agreements. Licensed under the Elastic License
5+
* 2.0; you may not use this file except in compliance with the Elastic License
6+
* 2.0.
7+
*/
8+
19
package org.elasticsearch.xpack.rank.linear;
210

311
import org.apache.lucene.search.ScoreDoc;
@@ -25,12 +33,12 @@ public ScoreDoc[] normalizeScores(ScoreDoc[] docs) {
2533
double sumOfSquares = 0.0;
2634
boolean atLeastOneValidScore = false;
2735
for (ScoreDoc rd : docs) {
28-
if (!Float.isNaN(rd.score)) {
36+
if (Float.isNaN(rd.score) == false) {
2937
atLeastOneValidScore = true;
3038
sumOfSquares += rd.score * rd.score;
3139
}
3240
}
33-
if (!atLeastOneValidScore) {
41+
if (atLeastOneValidScore == false) {
3442
// No valid scores to normalize
3543
return docs;
3644
}

0 commit comments

Comments
 (0)