dan-s1 commented on code in PR #9600:
URL: https://github.com/apache/nifi/pull/9600#discussion_r1904282650


##########
nifi-extension-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/main/java/org/apache/nifi/amqp/processors/AbstractAMQPProcessor.java:
##########
@@ -139,23 +139,16 @@ abstract class AbstractAMQPProcessor<T extends 
AMQPWorker> extends AbstractProce
             .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
             .build();
 
-    private static final List<PropertyDescriptor> propertyDescriptors;
-
-    static {
-        propertyDescriptors = List.of(
-                BROKERS,
-                HOST, PORT,
-                V_HOST,
-                USER,
-                PASSWORD,
-                AMQP_VERSION,
-                SSL_CONTEXT_SERVICE,
-                USE_CERT_AUTHENTICATION);
-    }
-
-    protected static List<PropertyDescriptor> getCommonPropertyDescriptors() {
-        return propertyDescriptors;
-    }
+    protected static final List<PropertyDescriptor> PARENT_PROPERTIES = 
List.of(
+            BROKERS,
+            HOST, PORT,
+            V_HOST,
+            USER,
+            PASSWORD,
+            AMQP_VERSION,
+            SSL_CONTEXT_SERVICE,
+            USE_CERT_AUTHENTICATION
+    );

Review Comment:
   I ended up adding 'getCommonPropertyDescriptors' for all the parent children 
relationships I saw. Below are the ones I made changes for (Parents on the left 
and children who use the method on the right).
   
   1. AbstractAMQPProcessor - ConsumeAMQP, PublishAMQP
   2. AbstractAwsMachineLearningJobStarter - StartAwsTextractJob
   3. AbstractAwsMachineLearningJobStatusProcessor - GetAwsTextractJobStatus
   4. AbstractAzureCosmosDBProcessor - PutAzureCosmosDBRecord
   5. AbstractEmailProcessor - ConsumeIMAP, ConsumePOP3
   6. AbstractGridFSProcessor (applies this also to relationships) - 
FetchGridFS, PutGridFS
   7. AbstractHadoopProcessor - AbstractFetchHDFSRecord, AbstractPutHDFSRecord 
(PutParquet but doesn't use common method), CreateHadoopSequenceFile, 
DeleteHDFS, FetchHDFS, GetHDFS, GetHDFSEvents, GetHDFSFileInfo, ListHDFS, 
MoveHDFS, PutHDFS
   8. AbstractJoltTransform - JoltTransformJSON, JoltTransformRecord
   9. AbstractMongoProcessor - DeleteMongo, GetMongo, PutMongo, 
PutMongoBulkOperations, PutMongoRecord, RunMongoAggregation
   



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