Skip to content

Apache Lucene open-source search software

Don't NPE on missing assertions.

Dawid Weiss3161334d2a87
diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java b/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java
index 4db9e943896..ab07ab35596 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java
@@ -156,7 +156,9 @@ public final class RunListenerPrintReproduceInfo extends RunListener {
if (!TEST_LINE_DOCS_FILE.equals(DEFAULT_LINE_DOCS_FILE)) addVmOpt(b, "tests.linedocsfile", TEST_LINE_DOCS_FILE);
if (classEnvRule != null) {
addVmOpt(b, "tests.locale", classEnvRule.locale);
- addVmOpt(b, "tests.timezone", classEnvRule.timeZone.getID());
+ if (classEnvRule.timeZone != null) {
+ addVmOpt(b, "tests.timezone", classEnvRule.timeZone.getID());
+ }
}
// Randomize this: LUCENE-4094
addVmOpt(b, "args", "-Dfile.encoding=" + System.getProperty("file.encoding"));