Make use of null-checked variable (#13040)

This commit is contained in:
sabi0 2024-01-29 09:19:07 +01:00 committed by GitHub
parent fe4631c8d2
commit 21e545501e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View File

@ -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");

View File

@ -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);
}
}
}

View File

@ -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) {