exceptionfactory commented on code in PR #6682:
URL: https://github.com/apache/nifi/pull/6682#discussion_r1026523366


##########
nifi-nar-bundles/nifi-hubspot-bundle/nifi-hubspot-processors/src/main/java/org/apache/nifi/processors/hubspot/GetHubSpot.java:
##########
@@ -234,6 +237,7 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
             FlowFile flowFile = session.create();
             flowFile = session.write(flowFile, parseHttpResponse(response, 
total, stateMap));
             if (total.get() > 0) {
+                session.putAttribute(flowFile, CoreAttributes.MIME_TYPE.key(), 
"application/json");

Review Comment:
   Calling `session.putAttribute()` should update the reference to `flowFile`:
   ```suggestion
                   flowFile = session.putAttribute(flowFile, 
CoreAttributes.MIME_TYPE.key(), "application/json");
   ```



##########
nifi-nar-bundles/nifi-shopify-bundle/nifi-shopify-processors/src/main/java/org/apache/nifi/processors/shopify/GetShopify.java:
##########
@@ -78,6 +80,7 @@
         " The list of the resources with the supported parameters can be found 
in the additional details.")
 @CapabilityDescription("Retrieves objects from a custom Shopify store. The 
processor yield time must be set to the account's rate limit accordingly.")
 @DefaultSchedule(strategy = SchedulingStrategy.TIMER_DRIVEN, period = "1 min")
+@WritesAttribute(attribute = "mime.type", description = "Sets the mime type to 
application/json")

Review Comment:
   Minor wording adjustment, MIME should be uppercased.
   ```suggestion
   @WritesAttribute(attribute = "mime.type", description = "Sets the MIME type 
to application/json")
   ```



##########
nifi-nar-bundles/nifi-shopify-bundle/nifi-shopify-processors/src/main/java/org/apache/nifi/processors/shopify/GetShopify.java:
##########
@@ -322,6 +325,7 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
                         updateState(session, updatedStateMap);
                     }
                     if (objectCountHolder.get() > 0) {
+                        session.putAttribute(flowFile, 
CoreAttributes.MIME_TYPE.key(), "application/json");

Review Comment:
   Calling `session.putAttribute()` should update the reference to `flowFile`:
   ```suggestion
                   flowFile = session.putAttribute(flowFile, 
CoreAttributes.MIME_TYPE.key(), "application/json");
   ```



##########
nifi-nar-bundles/nifi-hubspot-bundle/nifi-hubspot-processors/src/main/java/org/apache/nifi/processors/hubspot/GetHubSpot.java:
##########
@@ -82,6 +84,7 @@
         " objects can be set in the 'Result Limit' property.")
 @DefaultSettings(yieldDuration = "10 sec")
 @DefaultSchedule(strategy = SchedulingStrategy.TIMER_DRIVEN, period = "1 min")
+@WritesAttribute(attribute = "mime.type", description = "Sets the mime type to 
application/json")

Review Comment:
   Minor wording adjustment, MIME should be uppercased.
   ```suggestion
   @WritesAttribute(attribute = "mime.type", description = "Sets the MIME type 
to application/json")
   ```



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