You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/10/11 12:57:01 UTC

[PR] PPTX2PNG: check the output directory once [poi]

pjfanning opened a new pull request, #1385:
URL: https://github.com/apache/poi/pull/1385

   `PPTX2PNG.parseCommandLine` checked the output directory twice, and the two checks disagreed:
   
   1. `if (!outdir.exists())`, applied to every format and not checking that it's a directory.
   2. `if (!"null".equals(format) && (outdir == null || !outdir.exists() || !outdir.isDirectory()))`, which exempts `-format null` because it writes no files.
   
   Because check 1 ran first, the exemption in check 2 never applied: `-format null` with a missing output directory was rejected anyway. Check 2's `outdir == null` was dead code too, since `outdir` is always set by that point (SpotBugs RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE). They are now one check, with check 2's intended behaviour. The message is now `Output directory doesn't exist or isn't a directory`.
   
   `TestPPTX2PNG` passes (21 tests).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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: dev-unsubscribe@poi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [PR] PPTX2PNG: check the output directory once [poi]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #1385:
URL: https://github.com/apache/poi/pull/1385


-- 
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: dev-unsubscribe@poi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org