Fix potential NPE in ModelJsonAdapter
This commit is contained in:
parent
f439d07229
commit
0d512134ed
|
@ -76,7 +76,7 @@ public class ModelJsonAdapter extends JsonAdapter<Model> {
|
||||||
try {
|
try {
|
||||||
model.readSiteSpecificData(reader);
|
model.readSiteSpecificData(reader);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Couldn't read site specific data for model {}", model.getName());
|
LOG.error("Couldn't read site specific data for model {}", Optional.ofNullable(model).map(Model::getName).orElse("n/a"));
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
reader.endObject();
|
reader.endObject();
|
||||||
|
|
Loading…
Reference in New Issue