mirror of https://github.com/apache/nifi.git
NIFI-9416: Fixing NPE when updating param context without inheritedParameterContexts (#5553)
This commit is contained in:
parent
d6b6dd1eb4
commit
a5581562bf
|
@ -232,9 +232,11 @@ public class StandardParameterContextDAO implements ParameterContextDAO {
|
|||
resolveInheritedParameterContexts(parameterContextDto);
|
||||
|
||||
final List<ParameterContext> inheritedParameterContexts = new ArrayList<>();
|
||||
inheritedParameterContexts.addAll(parameterContextDto.getInheritedParameterContexts().stream()
|
||||
.map(entity -> flowManager.getParameterContextManager().getParameterContext(entity.getComponent().getId()))
|
||||
.collect(Collectors.toList()));
|
||||
if (parameterContextDto.getInheritedParameterContexts() != null) {
|
||||
inheritedParameterContexts.addAll(parameterContextDto.getInheritedParameterContexts().stream()
|
||||
.map(entity -> flowManager.getParameterContextManager().getParameterContext(entity.getComponent().getId()))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
return inheritedParameterContexts;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue