mirror of https://github.com/apache/lucene.git
Make use of null-checked variable (#13040)
This commit is contained in:
parent
fe4631c8d2
commit
21e545501e
|
@ -217,7 +217,7 @@ public class SearchFiles {
|
|||
System.out.println((i + 1) + ". " + path);
|
||||
String title = doc.get("title");
|
||||
if (title != null) {
|
||||
System.out.println(" Title: " + doc.get("title"));
|
||||
System.out.println(" Title: " + title);
|
||||
}
|
||||
} else {
|
||||
System.out.println((i + 1) + ". " + "No path for this document");
|
||||
|
|
|
@ -322,8 +322,7 @@ public class SortedSetDocValuesFacetCounts extends AbstractSortedSetDocValueFace
|
|||
if (liveDocs == null) {
|
||||
countOneSegmentNHLD(ordinalMap, context.reader(), context.ord);
|
||||
} else {
|
||||
countOneSegment(
|
||||
ordinalMap, context.reader(), context.ord, null, context.reader().getLiveDocs());
|
||||
countOneSegment(ordinalMap, context.reader(), context.ord, null, liveDocs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public class MessageFilesParser extends SimpleFileVisitor<Path> {
|
|||
if (attr.isRegularFile()) {
|
||||
Message message = parse(file);
|
||||
if (message != null) {
|
||||
messages.add(parse(file));
|
||||
messages.add(message);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue