dan-s1 commented on code in PR #9583:
URL: https://github.com/apache/nifi/pull/9583#discussion_r1888802294
##########
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:
@mosermw Excellent question. The `List.of() `method is overloaded and it
seems the max number of arguments it can take is 10. Hence where there are more
than 10 properties I has to use `Stream.of`.
--
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]