help fix possible NPE with Nifi access restrictions finding processgroups
@@ -357,7 +357,7 @@ public class NifiProcessUtil {
*/
@Nullable
public static ProcessGroupDTO findFirstProcessGroupByName(@Nonnull final Collection<ProcessGroupDTO> processGroups, @Nonnull final String name) {
- return processGroups.stream().filter(processGroup -> processGroup.getName().equalsIgnoreCase(name)).findAny().orElse(null);
+ return processGroups.stream().filter(processGroup -> processGroup != null && name != null && name.equalsIgnoreCase(processGroup.getName())).findAny().orElse(null);
}
/**
