LUCENE-9967: don't throw NullPointerException while handling a different root-cause exception in ReplicaNode.start

This commit is contained in:
Mike McCandless 2021-05-24 10:51:26 -04:00
parent f7fbb9eda5
commit 654e978190
2 changed files with 5 additions and 2 deletions

View File

@ -229,7 +229,6 @@ Improvements
Bug fixes
* LUCENE-9686: Fix read past EOF handling in DirectIODirectory. (Zach Chen,
Julie Tibshirani)
@ -395,6 +394,9 @@ Bug Fixes
the total count for a dimension. Prior to this fix, multi-value docs could contribute a > 1
count to the dimension count. (Greg Miller)
* LUCEDNE-9967: Do not throw NullPointerException while trying to handle another exception in
ReplicaNode.start (Steven Schlansker)
Other
---------------------

View File

@ -29,6 +29,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@ -332,7 +333,7 @@ public abstract class ReplicaNode extends Node {
message("top: done start");
state = "idle";
} catch (Throwable t) {
if (t.getMessage().startsWith("replica cannot start") == false) {
if (Objects.toString(t.getMessage()).startsWith("replica cannot start") == false) {
message("exc on start:");
t.printStackTrace(printStream);
} else {