exceptionfactory commented on code in PR #7660:
URL: https://github.com/apache/nifi/pull/7660#discussion_r1321829199
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteProcess.java:
##########
@@ -146,6 +148,13 @@ public class ExecuteProcess extends AbstractProcessor {
.defaultValue(" ")
.build();
+ static final PropertyDescriptor MIME_TYPE = new
PropertyDescriptor.Builder()
+ .name("mime-type")
+ .displayName("Mime Type")
Review Comment:
Recommend naming this `Output MIME Type` for clarity, also recommend using
the same value for `name` following the pattern of existing properties in this
class:
```suggestion
static final PropertyDescriptor OUTPUT_MIME_TYPE = new
PropertyDescriptor.Builder()
.name("Output MIME Type")
.displayName("Output MIME Type")
```
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteProcess.java:
##########
@@ -290,15 +302,20 @@ public void process(final OutputStream flowFileOut)
throws IOException {
session.remove(flowFile);
getLogger().error("Failed to read data from Process, so will not
generate FlowFile");
} else {
- // add command and arguments as attribute
- flowFile = session.putAttribute(flowFile, ATTRIBUTE_COMMAND,
command);
+ // add command, arguments, and MIME type as attributes
+ HashMap<String,String> attributes = new HashMap<>();
Review Comment:
The declared variable type should use the `Map` interface:
```suggestion
final Map<String,String> attributes = new HashMap<>();
```
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java:
##########
@@ -274,6 +276,14 @@ public class ExecuteStreamCommand extends
AbstractProcessor {
.defaultValue("256")
.build();
+ static final PropertyDescriptor MIME_TYPE = new
PropertyDescriptor.Builder()
+ .name("mime-type")
+ .displayName("Mime Type")
Review Comment:
```suggestion
static final PropertyDescriptor OUTPUT_MIME_TYPE = new
PropertyDescriptor.Builder()
.name("Output MIME Type")
.displayName("Output MIME Type")
```
--
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]