mirror of https://github.com/apache/nifi.git
NIFI-2546 fixed NPE in FlowSnippetDTO fixed NPE caused by non-configured ControllerService
This closes #859. Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
parent
fbd3201157
commit
51c566ffc8
|
@ -227,7 +227,7 @@ public class FlowSnippetDTO {
|
||||||
Map<String, PropertyDescriptorDTO> map = processorDTO.getConfig().getDescriptors();
|
Map<String, PropertyDescriptorDTO> map = processorDTO.getConfig().getDescriptors();
|
||||||
Map<String, String> props = processorDTO.getConfig().getProperties();
|
Map<String, String> props = processorDTO.getConfig().getProperties();
|
||||||
for (Entry<String, PropertyDescriptorDTO> entry : map.entrySet()) {
|
for (Entry<String, PropertyDescriptorDTO> entry : map.entrySet()) {
|
||||||
if (entry.getValue().getIdentifiesControllerService() != null) {
|
if (entry.getValue().getIdentifiesControllerService() != null && props.get(entry.getKey()) != null) {
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
String value = props.get(key);
|
String value = props.get(key);
|
||||||
id = UUID.fromString(value);
|
id = UUID.fromString(value);
|
||||||
|
|
Loading…
Reference in New Issue