dan-s1 commented on code in PR #8350:
URL: https://github.com/apache/nifi/pull/8350#discussion_r1476461300


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java:
##########
@@ -139,6 +145,20 @@ public class UnpackContent extends AbstractProcessor {
                     PackageFormat.FLOWFILE_STREAM_FORMAT_V2.toString(), 
PackageFormat.FLOWFILE_TAR_FORMAT.toString())
             .defaultValue(PackageFormat.AUTO_DETECT_FORMAT.toString())
             .build();
+    public static final PropertyDescriptor ZIP_FILENAMES_ENCODING = new 
PropertyDescriptor.Builder()
+            .name("zip-filenames-encoding")
+            .displayName("Zip Filenames Encoding")
+            .description(
+                "The encoding used by zip creating utility, for the file names 
inside the zip. Processor will pass this encoding to Zip unpacker. For example 
'Cp437', 'UTF8' etc. Default is to "
+                    + "use platform's encoding. This can be useful for example 
incase a zip was created on Windows with Cp437 and unpacked on Linux machine. 
Without correct encoding value special "
+                    + "characters in filenames will be outputted as `?`")
+            .required(false)
+            .dependsOn(
+                PACKAGING_FORMAT,
+                PackageFormat.ZIP_FORMAT.toString(),
+                PackageFormat.AUTO_DETECT_FORMAT.toString())
+            .addValidator(new CharsetStringValidator())
+            .build();

Review Comment:
   Add a default value so can simplify code on lines 255-257
   ```suggestion
     .defaultValue(Charset.defaultCharset())
     .build();
   ```



-- 
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: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to