exceptionfactory commented on code in PR #5966:
URL: https://github.com/apache/nifi/pull/5966#discussion_r850637375
##########
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:
The `databaseName` and `collection` properties are already set in
`onEnabled()`. Moving the property evaluation to this method should also
remove setting the values in the `onEnabled()` method.
--
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]