NIFI-2675 fixed NPE in template generation

This closes #951.

Signed-off-by: Andy LoPresto <alopresto@apache.org>
This commit is contained in:
Oleg Zhurakousky 2016-08-25 17:41:44 -04:00 committed by Andy LoPresto
parent 957c120343
commit 7879a99206
No known key found for this signature in database
GPG Key ID: 3C6EF65B2F7DEF69
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ public class FlowSnippetDTO {
Map<String, PropertyDescriptorDTO> map = csDTO.getDescriptors();
Map<String, String> props = csDTO.getProperties();
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 value = props.get(key);
id = UUID.fromString(value);