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


##########
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/AbstractMongoProcessor.java:
##########
@@ -373,6 +374,11 @@ protected Collection<ValidationResult> 
customValidate(ValidationContext context)
         boolean clientIsSet = context.getProperty(CLIENT_SERVICE).isSet();
         boolean uriIsSet    = context.getProperty(URI).isSet();
 
+        if (uriIsSet) {
+            
DeprecationLoggerFactory.getLogger(AbstractMongoProcessor.class).warn("The 
MongoDB URI and other client " +
+                    "configuration properties on this proessor are deprecated 
and will be removed in NiFi 2.0");

Review Comment:
   The message should indicate that the MongoClientService should be used. The 
`will be removed in NiFi 2.0` portion of the message should be removed since it 
is implicit in all deprecation warnings.
   ```suggestion
                       "connection properties should be replaced with an 
implementation of the MongoClientService");
   ```



##########
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/AbstractMongoProcessor.java:
##########
@@ -373,6 +374,11 @@ protected Collection<ValidationResult> 
customValidate(ValidationContext context)
         boolean clientIsSet = context.getProperty(CLIENT_SERVICE).isSet();
         boolean uriIsSet    = context.getProperty(URI).isSet();
 
+        if (uriIsSet) {
+            
DeprecationLoggerFactory.getLogger(AbstractMongoProcessor.class).warn("The 
MongoDB URI and other client " +

Review Comment:
   The `getLogger()` call should use `getClass()` to reference the actual 
Processor class instead of the abstract class.
   ```suggestion
               DeprecationLoggerFactory.getLogger(getClass()).warn("The MongoDB 
URI and other client " +
   ```



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