You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/11/21 18:07:03 UTC

[GitHub] [lucene] shubhamvishu commented on a diff in pull request #11950: Fix NPE in BinaryRangeFieldRangeQuery when field does not exist or is of wrong type

shubhamvishu commented on code in PR #11950:
URL: https://github.com/apache/lucene/pull/11950#discussion_r1028376885


##########
lucene/core/src/test/org/apache/lucene/search/TestRangeFieldsDocValuesQuery.java:
##########
@@ -226,4 +228,30 @@ public void testToString() {
     Query q4 = LongRangeDocValuesField.newSlowIntersectsQuery("foo", longMin, longMax);
     assertEquals("foo:[[101, 124, 137] TO [138, 145, 156]]", q4.toString());
   }
+
+  public void testNoData() throws IOException {
+    Directory dir = newDirectory();

Review Comment:
   How about using try-with-resources here?



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org