muse-dev[bot] commented on a change in pull request #2153: URL: https://github.com/apache/lucene-solr/pull/2153#discussion_r547326682
########## File path: lucene/core/src/test/org/apache/lucene/util/TestSmallFloat.java ########## @@ -167,22 +170,24 @@ public void testByte4() { } } - /*** - // Do an exhaustive test of all possible floating point values - // for the 315 float against the original norm encoding in Similarity. - // Takes 75 seconds on my Pentium4 3GHz, with Java5 -server + @Ignore("One-time test.") public void testAllFloats() { - for(int i = Integer.MIN_VALUE;;i++) { + for (int i = Integer.MIN_VALUE; ; i++) { float f = Float.intBitsToFloat(i); - if (f==f) { // skip non-numbers + if (f == f) { // skip non-numbers Review comment: *opt.semgrep.java.lang.correctness.eqeq.eqeq:* `f == f` or `f != f` is always true. (Unless the value compared is a float or double). To test if `f` is not-a-number, use `Double.isNaN(f)`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org