gresockj commented on a change in pull request #5415:
URL: https://github.com/apache/nifi/pull/5415#discussion_r735825183



##########
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractComponentNode.java
##########
@@ -773,10 +763,22 @@ public final ValidationStatus performValidation() {
             for (final String paramName : referencedParameters) {
                 if (!validationContext.isParameterDefined(paramName)) {
                     results.add(new ValidationResult.Builder()
-                        .subject(propertyDescriptor.getDisplayName())
-                        .valid(false)
-                        .explanation("Property references Parameter '" + 
paramName + "' but the currently selected Parameter Context does not have a 
Parameter with that name")
-                        .build());
+                            .subject(propertyDescriptor.getDisplayName())
+                            .valid(false)
+                            .explanation("Property references Parameter '" + 
paramName + "' but the currently selected Parameter Context does not have a 
Parameter with that name")
+                            .build());
+                }
+                final Optional<Parameter> parameterRef = 
parameterContext.getParameter(paramName);
+                if (parameterRef.isPresent()) {
+                    ParameterDescriptor parameterDescriptor = 
parameterRef.get().getDescriptor();

Review comment:
       I think `parameterDescriptor` could still be `final` here.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to