exceptionfactory commented on code in PR #8610:
URL: https://github.com/apache/nifi/pull/8610#discussion_r1569407812
##########
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java:
##########
@@ -127,20 +153,17 @@ public class PutMongo extends AbstractMongoProcessor {
private final static List<PropertyDescriptor> propertyDescriptors;
static {
- List<PropertyDescriptor> _propertyDescriptors = new ArrayList<>();
- _propertyDescriptors.addAll(descriptors);
+ List<PropertyDescriptor> _propertyDescriptors = new
ArrayList<>(descriptors);
_propertyDescriptors.add(MODE);
_propertyDescriptors.add(UPSERT);
_propertyDescriptors.add(UPDATE_QUERY_KEY);
_propertyDescriptors.add(UPDATE_QUERY);
- _propertyDescriptors.add(UPDATE_MODE);
+ _propertyDescriptors.add(UPDATE_OPERATION_MODE);
+ _propertyDescriptors.add(MONGO_UPDATE_MODE);
_propertyDescriptors.add(CHARACTER_SET);
propertyDescriptors =
Collections.unmodifiableList(_propertyDescriptors);
- final Set<Relationship> _relationships = new HashSet<>();
- _relationships.add(REL_SUCCESS);
- _relationships.add(REL_FAILURE);
- relationships = Collections.unmodifiableSet(_relationships);
+ relationships = Set.of(REL_SUCCESS, REL_FAILURE);
Review Comment:
Just a note on that, this is a helpful change for the main branch, and if
the other aspects of the feature are to be backported, an alternative PR could
be raised.
--
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]