diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractConfiguredComponent.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractConfiguredComponent.java index 2aa84f8b84..45c6eadaac 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractConfiguredComponent.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractConfiguredComponent.java @@ -217,7 +217,7 @@ public abstract class AbstractConfiguredComponent implements ConfigurableCompone } try { - getComponent().onPropertyModified(descriptor, oldValue, value); + onPropertyModified(descriptor, oldValue, value); } catch (final Exception e) { // nothing really to do here... } @@ -253,7 +253,7 @@ public abstract class AbstractConfiguredComponent implements ConfigurableCompone } try { - getComponent().onPropertyModified(descriptor, value, null); + onPropertyModified(descriptor, value, null); } catch (final Exception e) { getLogger().error(e.getMessage(), e); } @@ -436,7 +436,7 @@ public abstract class AbstractConfiguredComponent implements ConfigurableCompone } @Override - public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { + public final void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { invalidateValidationContext(); try (final NarCloseable narCloseable = NarCloseable.withComponentNarLoader(getComponent().getClass(), getComponent().getIdentifier())) { getComponent().onPropertyModified(descriptor, oldValue, newValue); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java index 401111322d..5c4e394c0a 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java @@ -162,7 +162,7 @@ public class StandardControllerServiceProvider implements ControllerServiceProvi } } - serviceCache.put(id, serviceNode); + serviceCache.putIfAbsent(id, serviceNode); return serviceNode; } catch (final Throwable t) {