exceptionfactory commented on code in PR #5966:
URL: https://github.com/apache/nifi/pull/5966#discussion_r850667469


##########
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-services/src/main/java/org/apache/nifi/mongodb/MongoDBLookupService.java:
##########
@@ -223,7 +223,9 @@ protected List<PropertyDescriptor> 
getSupportedPropertyDescriptors() {
         return Collections.unmodifiableList(_temp);
     }
 
-    private Document findOne(Document query, Document projection) {
+    private Document findOne(Document query, Document projection,Map<String, 
String> context) {
+        final String databaseName = 
getProperty(DATABASE_NAME).evaluateAttributeExpressions(context).getValue();
+        final String collection = 
getProperty(COLLECTION_NAME).evaluateAttributeExpressions(context).getValue();

Review Comment:
   Creating the new variables as you have makes sense, but the member variables 
for `databaseName` and `collection` should be removed, since these additions 
shadow the member variable names.



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