fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.07k stars 134 forks source link

Prevent run-time exception when image mounting fails #379

Closed jyoo980 closed 12 months ago

jyoo980 commented 1 year ago

This is a patch that prevents a run-time exception when mounting an image fails when a .dmg file is generated.

fvarrui commented 12 months ago

Hi @jyoo980! Great!!! It seems I've not been using well "optionals" 😅 Thanks for your contribution

jyoo980 commented 11 months ago

Hi @fvarrui!

The Optional class is really annoying to use; and there are a lot of gotchas that can be difficult to catch. If you're interested in automated tools to help you catch bugs like these or more, I've been using the Checker Framework, which helps find bugs like these at compile-time!