Fix NPE on template import
@@ -431,6 +431,8 @@ public class NifiPropertyUtil {
registrationChangeInfo.setValueFromOlderNiFiTemplate(property.getTemplateValue());
registrationChangeInfo.setValueRegisteredInKyloTemplateFromOlderNiFiTemplate(property.getValue());
+
+ if ((propertyToUpdate.getValue()!=null) && (property.getValue()!=null)) {
if ((!propertyToUpdate.getValue().equals(property.getValue())) && (property.getValue().equals(property.getTemplateValue()))) {
log.debug("Registration change info case 1: NiFi property value has changed to " + propertyToUpdate.getKey() + "=" + propertyToUpdate.getValue()
+ ". Original NiFi property value was " + property.getKey() + "=" + property.getTemplateValue()
@@ -445,6 +447,9 @@ public class NifiPropertyUtil {
} else {
log.debug("Registration change info case 3: Default");
}
+ } else {
+ log.debug("Registration change info case 4: Default (values are null case)");
+ }
propertyToUpdate.setRegistrationChangeInfo(registrationChangeInfo);
propertyToUpdate.setUserEditable(property.isUserEditable());
