Github user trkurc commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1941#discussion_r125171843
--- 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 --
it isn't documented in any style guide, but I'd certainly say that there is
a bias in the project towards liberal use of final for local variables.
---
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.
---