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

    https://github.com/apache/nifi/pull/1941#discussion_r125168375
  
    --- Diff: 
nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/main/java/org/apache/nifi/snmp/processors/AbstractSNMPProcessor.java
 ---
    @@ -389,30 +391,31 @@ private AbstractTarget 
createSnmpTarget(ProcessContext context) {
                 break;
             }
     
    -        if(version == SnmpConstants.version3) {
    -            final String username = 
context.getProperty(SNMP_SECURITY_NAME).getValue();
    -            final String authPassword = 
context.getProperty(SNMP_AUTH_PASSWORD).getValue();
    -            final String privPassword = 
context.getProperty(SNMP_PRIV_PASSWORD).getValue();
    -            final String authProtocol = 
context.getProperty(SNMP_AUTH_PROTOCOL).getValue();
    -            final String privProtocol = 
context.getProperty(SNMP_PRIV_PROTOCOL).getValue();
    +        AbstractTarget result;
    +        if (version == SnmpConstants.version3) {
    +            String username = 
context.getProperty(SNMP_SECURITY_NAME).getValue();
    --- End diff --
    
    That is mostly a personal preference as I find they are mostly not needed. 
I know that there's coding style guidelines for this in some Hadoop related 
projects and most of them don't use `final` for local variables or method 
parameters. So I adopted this style here. But if NiFi follows another style I'm 
happy to keep them.


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