joewitt commented on code in PR #9583:
URL: https://github.com/apache/nifi/pull/9583#discussion_r1888826551


##########
nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongoRecord.java:
##########
@@ -79,35 +77,29 @@ public class GetMongoRecord extends 
AbstractMongoQueryProcessor {
         .required(true)
         .build();
 
-    private static final List<PropertyDescriptor> DESCRIPTORS;
-    private static final Set<Relationship> RELATIONSHIPS;
-
-    static {
-        List<PropertyDescriptor> _temp = new ArrayList<>();
-        _temp.add(CLIENT_SERVICE);
-        _temp.add(WRITER_FACTORY);
-        _temp.add(DATABASE_NAME);
-        _temp.add(COLLECTION_NAME);
-        _temp.add(SCHEMA_NAME);
-        _temp.add(QUERY_ATTRIBUTE);
-        _temp.add(QUERY);
-        _temp.add(PROJECTION);
-        _temp.add(SORT);
-        _temp.add(LIMIT);
-        _temp.add(BATCH_SIZE);
-
-        DESCRIPTORS = Collections.unmodifiableList(_temp);
-
-        Set<Relationship> _rels = new HashSet<>();
-        _rels.add(REL_SUCCESS);
-        _rels.add(REL_FAILURE);
-        _rels.add(REL_ORIGINAL);
-        RELATIONSHIPS = Collections.unmodifiableSet(_rels);
-    }
+    private static final List<PropertyDescriptor> PROPERTIES = Stream.of(

Review Comment:
   Yeah i'd say unless we're able to move from current practice to one clean 
model that offers the same semantics with cleaner code then it isn't worth 
changing.



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