Skip to content

Commit

Permalink
Avoid NullPointerException when customChange has no "class" attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
danielthegray committed Jan 22, 2021
1 parent 46fc9ce commit c95798b
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -305,7 +305,11 @@ public String getSerializedObjectNamespace() {
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException {
setClassLoader(resourceAccessor.toClassLoader());
try {
setClass(parsedNode.getChildValue(null, "class", String.class));
String classNameValue = parsedNode.getChildValue(null, "class", String.class);
if (classNameValue == null) {
throw new ParsedNodeException("Custom change node has no 'class' attribute!");
}
setClass(classNameValue);
} catch (CustomChangeException e) {
throw new ParsedNodeException(e);
}
Expand Down

0 comments on commit c95798b

Please sign in to comment.