Github user mosermw commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1036#discussion_r81411506
  
    --- Diff: 
nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/ConsumeJMS.java
 ---
    @@ -116,18 +154,26 @@ protected JMSConsumer 
finishBuildingTargetResource(JmsTemplate jmsTemplate) {
         }
     
         /**
    +     *
    +     */
    +    @Override
    +    protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
    +        List<PropertyDescriptor> pd = new 
ArrayList<>(super.getSupportedPropertyDescriptors());
    +        pd.add(ACKNOWLEDGEMENT_MODE);
    +        return pd;
    --- End diff --
    
    Not an incredibly big deal, but getSupportedPropertyDescriptors() is called 
very often (most often in validation during a UI Refresh) which causes lots of 
ArrayLists to be created.  I prefer the way DistributeLoad handles this, by 
creating one ArrayList and reusing it, while also using an AtomicBoolean to 
know when it should be recreated.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to