sonatype-lift[bot] commented on a change in pull request #499:
URL: https://github.com/apache/lucene/pull/499#discussion_r760497387



##########
File path: 
lucene/core/src/java/org/apache/lucene/document/LatLonPointDistanceQuery.java
##########
@@ -295,6 +295,12 @@ public void visit(int docID) {
             cost[0]--;
           }
 
+          @Override
+          public void visit(DocIdSetIterator iterator) throws IOException {
+            result.andNot(iterator);
+            cost[0] -= iterator.cost();

Review comment:
       *NarrowingCompoundAssignment:*  Compound assignments from long to int 
hide lossy casts 
[(details)](https://errorprone.info/bugpattern/NarrowingCompoundAssignment)
   (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with 
`help` or `ignore`)

##########
File path: lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
##########
@@ -217,6 +217,12 @@ public void visit(int docID) {
             cost[0]--;
           }
 
+          @Override
+          public void visit(DocIdSetIterator iterator) throws IOException {
+            result.andNot(iterator);
+            cost[0] -= iterator.cost();

Review comment:
       *NarrowingCompoundAssignment:*  Compound assignments from long to int 
hide lossy casts 
[(details)](https://errorprone.info/bugpattern/NarrowingCompoundAssignment)
   (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with 
`help` or `ignore`)

##########
File path: lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java
##########
@@ -351,16 +351,34 @@ private void and(final long[] otherArr, final int 
otherNumWords) {
     }
   }
 
+  public void andNot(DocIdSetIterator iter) throws IOException {
+    if (BitSetIterator.getFixedBitSetOrNull(iter) != null) {
+      checkUnpositioned(iter);
+      final FixedBitSet bits = BitSetIterator.getFixedBitSetOrNull(iter);
+      andNot(bits);

Review comment:
       *NULL_DEREFERENCE:*  object `bits` last assigned on line 357 could be 
null and is dereferenced by call to `andNot(...)` at line 358.
   (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with 
`help` or `ignore`)




-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

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

Reply via email to