fix NPE in tests

This commit is contained in:
Grahame Grieve 2023-04-17 04:23:11 +10:00
parent f1d5676425
commit 6644d9bd6d
1 changed files with 3 additions and 1 deletions

View File

@ -167,7 +167,9 @@ public class TxTester {
private boolean runTest(JsonObject test, TerminologyClient tx, List<Resource> setup, String filter, JsonArray output) {
JsonObject outputT = new JsonObject();
output.add(outputT);
if (output != null) {
output.add(outputT);
}
outputT.add("name", test.asString("name"));
if (Utilities.noString(filter) || filter.equals("*") || test.asString("name").contains(filter)) {
System.out.print(" Test "+test.asString("name")+": ");