hr-ireh commented on code in PR #9776:
URL: https://github.com/apache/nifi/pull/9776#discussion_r1982973063


##########
nifi-extension-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/main/java/org/apache/nifi/amqp/processors/AbstractAMQPProcessor.java:
##########
@@ -303,7 +311,8 @@ protected Connection createConnection(ProcessContext 
context, ExecutorService ex
         final ConnectionFactory cf = new ConnectionFactory();
         
cf.setUsername(context.getProperty(USER).evaluateAttributeExpressions().getValue());
         cf.setPassword(context.getProperty(PASSWORD).getValue());
-
+        
cf.setMaxInboundMessageBodySize(Integer.parseInt(context.getProperty(MAX_INBOUND_MESSAGE_BODY_SIZE).evaluateAttributeExpressions().getValue()));
+        

Review Comment:
   MaxInboundMessageBodySize is an integer and we need to validate that the 
input is not out of range.
   
   My suggestion is to use this:
   StandardValidators.POSITIVE_INTEGER_VALIDATOR



-- 
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