diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 2f4827b2294..b693543c1c0 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -214,6 +214,9 @@ Bug Fixes * SOLR-9441: Solr collection backup on HDFS can only be manipulated by the Solr process owner. (Hrishikesh Gadre via Mark Miller) +* SOLR-9536: OldBackupDirectory timestamp field needs to be initialized to avoid NPE. + (Hrishikesh Gadre via Mark Miller) + Optimizations ---------------------- diff --git a/solr/core/src/java/org/apache/solr/handler/OldBackupDirectory.java b/solr/core/src/java/org/apache/solr/handler/OldBackupDirectory.java index 2b19116c926..79c5f09f7e9 100644 --- a/solr/core/src/java/org/apache/solr/handler/OldBackupDirectory.java +++ b/solr/core/src/java/org/apache/solr/handler/OldBackupDirectory.java @@ -32,7 +32,7 @@ class OldBackupDirectory implements Comparable { private URI basePath; private String dirName; - private Optional timestamp; + private Optional timestamp = Optional.empty(); public OldBackupDirectory(URI basePath, String dirName) { this.dirName = Preconditions.checkNotNull(dirName);