Skip to content

Drop UncheckedNoSuchAlgorithmException#60

Merged
jchambers merged 1 commit into
mainfrom
checked_no_such_algorithm_exception
Jun 11, 2026
Merged

Drop UncheckedNoSuchAlgorithmException#60
jchambers merged 1 commit into
mainfrom
checked_no_such_algorithm_exception

Conversation

@jchambers

Copy link
Copy Markdown
Owner

This partially rolls back the changes from #29. Introducing an unchecked version of NoSuchAlgorithmException helped in some ways, but muddied the waters in others. After this change, we simply don't throw exceptions at all in cases where callers are specifying an algorithm that the JRE must support, but may throw a checked NoSuchAlgorithmException in cases where the algorithm legitimately might not be supported.

I think/hope this still grants the ergonomic benefits we hoped to achieve in #29 while being a little more correct.

It also bears mentioning that this would be a lot easier under Java 25 with flexible constructor bodies, but I don't think this change justifies a very large jump in minimum supported Java version.

@jchambers jchambers force-pushed the checked_no_such_algorithm_exception branch from f309546 to c343b63 Compare June 7, 2026 15:29
@jchambers jchambers merged commit dff5743 into main Jun 11, 2026
10 checks passed
@jchambers jchambers deleted the checked_no_such_algorithm_exception branch June 11, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant