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: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to