Skip to content
Snippets Groups Projects
Commit 93bb5141 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

openLoaded method NPE check

parent 644b2ade
No related branches found
No related tags found
No related merge requests found
Pipeline #1159 passed
...@@ -184,6 +184,12 @@ public class TapSchemaLoader implements Serializable { ...@@ -184,6 +184,12 @@ public class TapSchemaLoader implements Serializable {
} }
public String openLoaded() { public String openLoaded() {
if (loadedTapSchema == null) {
throw new IllegalStateException("Attempted to access a TAP_SCHEMA not loaded yet. "
+ "This may be caused by an error on frontend or a browser cache issue.");
}
ConsistencyChecks checks = loadedTapSchema.getConsistencyChecks(); ConsistencyChecks checks = loadedTapSchema.getConsistencyChecks();
if (checks != null && (checks.isInconsistent() || checks.isHasWarnings())) { if (checks != null && (checks.isInconsistent() || checks.isHasWarnings())) {
consistencyChecksBean.setTapSchema(loadedTapSchema); consistencyChecksBean.setTapSchema(loadedTapSchema);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment