dan-s1 commented on code in PR #9583:
URL: https://github.com/apache/nifi/pull/9583#discussion_r1888812990
##########
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 I take that back I just noticed in the `List.of` documentation that
there is a version which
> Returns an unmodifiable list containing an arbitrary number of elements.
Thanks for bringing this up. I will make the necessary changes where needed.
--
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]