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:
Oleg Zhurakousky 2016-08-15 11:47:28 -04:00 committed by Bryan Bende
parent fbd3201157
commit 51c566ffc8
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
1 changed files with 1 additions and 1 deletions

View File

@ -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);