When we fail to locate a type it constitutes an IllegalState, not
a plain NPE.
Change-Id: I46eaa470342a5e72ad6a92aefed97e458a2ca398
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
targetTypeBuilder = findCaseByPath(targetSchemaNode.getPath());
}
if (targetTypeBuilder == null) {
- throw new NullPointerException("Target type not yet generated: " + targetSchemaNode);
+ throw new IllegalStateException("Target type not yet generated: " + targetSchemaNode);
}
if (!(targetSchemaNode instanceof ChoiceSchemaNode)) {