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);
|
System.out.println((i + 1) + ". " + path);
|
||||||
String title = doc.get("title");
|
String title = doc.get("title");
|
||||||
if (title != null) {
|
if (title != null) {
|
||||||
System.out.println(" Title: " + doc.get("title"));
|
System.out.println(" Title: " + title);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
System.out.println((i + 1) + ". " + "No path for this document");
|
System.out.println((i + 1) + ". " + "No path for this document");
|
||||||
|
|
|
@ -322,8 +322,7 @@ public class SortedSetDocValuesFacetCounts extends AbstractSortedSetDocValueFace
|
||||||
if (liveDocs == null) {
|
if (liveDocs == null) {
|
||||||
countOneSegmentNHLD(ordinalMap, context.reader(), context.ord);
|
countOneSegmentNHLD(ordinalMap, context.reader(), context.ord);
|
||||||
} else {
|
} else {
|
||||||
countOneSegment(
|
countOneSegment(ordinalMap, context.reader(), context.ord, null, liveDocs);
|
||||||
ordinalMap, context.reader(), context.ord, null, context.reader().getLiveDocs());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class MessageFilesParser extends SimpleFileVisitor<Path> {
|
||||||
if (attr.isRegularFile()) {
|
if (attr.isRegularFile()) {
|
||||||
Message message = parse(file);
|
Message message = parse(file);
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
messages.add(parse(file));
|
messages.add(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue