mattyb149 commented on a change in pull request #4520:
URL: https://github.com/apache/nifi/pull/4520#discussion_r487072327



##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestWriteXMLResult.java
##########
@@ -85,7 +85,7 @@ public void testRecordNameIsNullSchemaIdentifierMissing() {
 
         try {
             new WriteXMLResult(recordSet.getSchema(), new 
SchemaNameAsAttribute(),
-                    out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "root", 
null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
+                    out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, 
"root", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);

Review comment:
       I didn't see a unit test where omitDeclaration is set to true, let's 
make sure there is one and we verify that the header is not written out when 
true.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
##########
@@ -80,6 +80,16 @@
             .required(true)
             .build();
 
+    public static final PropertyDescriptor OMIT_XML_DECLARATION = new 
PropertyDescriptor.Builder()
+            .name("omit_xml_declaration")
+            .displayName("Omit XML Declaration")
+            .description("Specifies whether or not to include XML declaration")
+            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+            .allowableValues("true", "false")
+            .defaultValue("false")
+            .required(false)

Review comment:
       The standard convention for properties with a set of allowable values is 
to make the property required. Functionally it doesn't matter but I will set it 
to true for consistency when I merge.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestWriteXMLResult.java
##########
@@ -85,7 +85,7 @@ public void testRecordNameIsNullSchemaIdentifierMissing() {
 
         try {
             new WriteXMLResult(recordSet.getSchema(), new 
SchemaNameAsAttribute(),
-                    out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "root", 
null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
+                    out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, 
"root", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);

Review comment:
       I didn't see a unit test where omitDeclaration is set to true, let's 
make sure there is one and we verify that the header is not written out when 
true.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
##########
@@ -80,6 +80,16 @@
             .required(true)
             .build();
 
+    public static final PropertyDescriptor OMIT_XML_DECLARATION = new 
PropertyDescriptor.Builder()
+            .name("omit_xml_declaration")
+            .displayName("Omit XML Declaration")
+            .description("Specifies whether or not to include XML declaration")
+            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+            .allowableValues("true", "false")
+            .defaultValue("false")
+            .required(false)

Review comment:
       The standard convention for properties with a set of allowable values is 
to make the property required. Functionally it doesn't matter but I will set it 
to true for consistency when I merge.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestWriteXMLResult.java
##########
@@ -85,7 +85,7 @@ public void testRecordNameIsNullSchemaIdentifierMissing() {
 
         try {
             new WriteXMLResult(recordSet.getSchema(), new 
SchemaNameAsAttribute(),
-                    out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "root", 
null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
+                    out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, 
"root", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);

Review comment:
       I didn't see a unit test where omitDeclaration is set to true, let's 
make sure there is one and we verify that the header is not written out when 
true.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
##########
@@ -80,6 +80,16 @@
             .required(true)
             .build();
 
+    public static final PropertyDescriptor OMIT_XML_DECLARATION = new 
PropertyDescriptor.Builder()
+            .name("omit_xml_declaration")
+            .displayName("Omit XML Declaration")
+            .description("Specifies whether or not to include XML declaration")
+            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+            .allowableValues("true", "false")
+            .defaultValue("false")
+            .required(false)

Review comment:
       The standard convention for properties with a set of allowable values is 
to make the property required. Functionally it doesn't matter but I will set it 
to true for consistency when I merge.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestWriteXMLResult.java
##########
@@ -85,7 +85,7 @@ public void testRecordNameIsNullSchemaIdentifierMissing() {
 
         try {
             new WriteXMLResult(recordSet.getSchema(), new 
SchemaNameAsAttribute(),
-                    out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "root", 
null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
+                    out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, 
"root", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);

Review comment:
       I didn't see a unit test where omitDeclaration is set to true, let's 
make sure there is one and we verify that the header is not written out when 
true.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
##########
@@ -80,6 +80,16 @@
             .required(true)
             .build();
 
+    public static final PropertyDescriptor OMIT_XML_DECLARATION = new 
PropertyDescriptor.Builder()
+            .name("omit_xml_declaration")
+            .displayName("Omit XML Declaration")
+            .description("Specifies whether or not to include XML declaration")
+            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+            .allowableValues("true", "false")
+            .defaultValue("false")
+            .required(false)

Review comment:
       The standard convention for properties with a set of allowable values is 
to make the property required. Functionally it doesn't matter but I will set it 
to true for consistency when I merge.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestWriteXMLResult.java
##########
@@ -85,7 +85,7 @@ public void testRecordNameIsNullSchemaIdentifierMissing() {
 
         try {
             new WriteXMLResult(recordSet.getSchema(), new 
SchemaNameAsAttribute(),
-                    out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "root", 
null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
+                    out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, 
"root", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);

Review comment:
       I didn't see a unit test where omitDeclaration is set to true, let's 
make sure there is one and we verify that the header is not written out when 
true.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
##########
@@ -80,6 +80,16 @@
             .required(true)
             .build();
 
+    public static final PropertyDescriptor OMIT_XML_DECLARATION = new 
PropertyDescriptor.Builder()
+            .name("omit_xml_declaration")
+            .displayName("Omit XML Declaration")
+            .description("Specifies whether or not to include XML declaration")
+            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+            .allowableValues("true", "false")
+            .defaultValue("false")
+            .required(false)

Review comment:
       The standard convention for properties with a set of allowable values is 
to make the property required. Functionally it doesn't matter but I will set it 
to true for consistency when I merge.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestWriteXMLResult.java
##########
@@ -85,7 +85,7 @@ public void testRecordNameIsNullSchemaIdentifierMissing() {
 
         try {
             new WriteXMLResult(recordSet.getSchema(), new 
SchemaNameAsAttribute(),
-                    out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "root", 
null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
+                    out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, 
"root", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);

Review comment:
       I didn't see a unit test where omitDeclaration is set to true, let's 
make sure there is one and we verify that the header is not written out when 
true.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
##########
@@ -80,6 +80,16 @@
             .required(true)
             .build();
 
+    public static final PropertyDescriptor OMIT_XML_DECLARATION = new 
PropertyDescriptor.Builder()
+            .name("omit_xml_declaration")
+            .displayName("Omit XML Declaration")
+            .description("Specifies whether or not to include XML declaration")
+            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+            .allowableValues("true", "false")
+            .defaultValue("false")
+            .required(false)

Review comment:
       The standard convention for properties with a set of allowable values is 
to make the property required. Functionally it doesn't matter but I will set it 
to true for consistency when I merge.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/xml/TestWriteXMLResult.java
##########
@@ -85,7 +85,7 @@ public void testRecordNameIsNullSchemaIdentifierMissing() {
 
         try {
             new WriteXMLResult(recordSet.getSchema(), new 
SchemaNameAsAttribute(),
-                    out, true, ALWAYS_SUPPRESS, NO_WRAPPING, null, "root", 
null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);
+                    out, true, false, ALWAYS_SUPPRESS, NO_WRAPPING, null, 
"root", null, "UTF-8", DATE_FORMAT, TIME_FORMAT, TIMESTAMP_FORMAT);

Review comment:
       I didn't see a unit test where omitDeclaration is set to true, let's 
make sure there is one and we verify that the header is not written out when 
true.

##########
File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/xml/XMLRecordSetWriter.java
##########
@@ -80,6 +80,16 @@
             .required(true)
             .build();
 
+    public static final PropertyDescriptor OMIT_XML_DECLARATION = new 
PropertyDescriptor.Builder()
+            .name("omit_xml_declaration")
+            .displayName("Omit XML Declaration")
+            .description("Specifies whether or not to include XML declaration")
+            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+            .allowableValues("true", "false")
+            .defaultValue("false")
+            .required(false)

Review comment:
       The standard convention for properties with a set of allowable values is 
to make the property required. Functionally it doesn't matter but I will set it 
to true for consistency when I merge.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to