Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFCORE-5520] Avoid Nullpointer (host-controller) #4694

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -375,8 +375,10 @@ private void processNonOrderedChildrenOfType(final ChildContext childContext, fi
throw new IllegalStateException();
}
}
for (final Node currentChild : currentChildren.values()) {
removeChildRecursive(currentChild, operations, registration.getSubModel(PathAddress.pathAddress(currentChild.element)), false);
if (currentChildren != null) {
for (final Node currentChild : currentChildren.values()) {
removeChildRecursive(currentChild, operations, registration.getSubModel(PathAddress.pathAddress(currentChild.element)), false);
}
}
}

Expand Down
Expand Up @@ -52,7 +52,10 @@ public enum DirectoryGrouping {
}

public static DirectoryGrouping forName(String localName) {
final DirectoryGrouping directoryGrouping = localName != null ? MAP.get(localName.toLowerCase()) : null;
if (localName == null) {
return null;
}
final DirectoryGrouping directoryGrouping = MAP.get(localName.toLowerCase());
return directoryGrouping == null ? DirectoryGrouping.valueOf(localName.toUpperCase(Locale.ENGLISH)) : directoryGrouping;
}

Expand Down