RFR: 7192189: Support endpoint identification algorithm in RFC 6125 [v2]

Sean Mullan mullan at openjdk.java.net
Tue Mar 8 13:00:50 UTC 2022


On Mon, 7 Mar 2022 21:26:56 GMT, Rajan Halade <rhalade at openjdk.org> wrote:

>> Sean Mullan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Merge Wildcard test into TestHostnameCheck.
>>   Rename HostnameMatcher dir to HostnameChecker.
>
> test/jdk/sun/security/util/HostnameChecker/Wildcard.java line 72:
> 
>> 70:         } catch (Exception e) {
>> 71:             if (expected) {
>> 72:                 throw new Exception("unexpectedly failed match", e);
> 
> consider to update these to RuntimeException

What are the benefits of throwing `RuntimeException` instead of `Exception`? In the latest commit, I have merged the `Wildcard.java` test into `TestHostnameChecker.java` test which already throws `Exception` on failures.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7697



More information about the security-dev mailing list