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


##########
nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/src/main/java/org/apache/nifi/processors/poi/ConvertExcelToCSVProcessor.java:
##########
@@ -199,6 +213,10 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
         final int firstRow = 
context.getProperty(ROWS_TO_SKIP).evaluateAttributeExpressions(flowFile).asInteger()
 - 1;
         final List<Integer> columnsToSkip = getColumnsToSkip(context, 
flowFile);
 
+        // Set min inflate ratio before loading documents
+        final float minInflateRatio = 
context.getProperty(MIN_INFLATE_RATIO).evaluateAttributeExpressions(flowFile).asFloat();
+        ZipSecureFile.setMinInflateRatio(minInflateRatio);

Review Comment:
   Thanks for the reply. Yes, if all components use the same setting, that 
would work.
   
   Checking the current value is a good idea. This could be checked during 
custom validation, and the property could be marked invalid if it is current 
minimum, using the default value of `0.01` to determine whether the value is 
set elsewhere.
   
   Using instance class-loading is another interesting option. It is a bit of a 
heavy-weight solution in light of the optional property, but it may be the 
safest solution. I agree this would also impact the ExcelReader. Might be worth 
some additional evaluation of the supporting library classes.



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