On Wed, 3 May 2023 22:11:20 GMT, Kevin Driver <kdri...@openjdk.org> wrote:

> I will look at making related changes in these spots as well.
> 
OK.

> @XueleiFan wrt your other question about updating the `getAuthorities` 
> method, I considered this, but it looks like it would involve changing a 
> method signature for that method.

Changing the signature should be fine as it is a internal method.  But I'm fine 
if the calls to getAuthorities() have considered the impact of illegal values 
of X500Principal.

Anyway, this is a typical example to show how hard to use runtime exception.  
From the viewpoint of X500Principal, and unchecked exception should be thrown 
for invalid input values.  But for the caller, it may need to check the input 
values for sure everything is good.  However, an unchecked exception cannot be 
detected by Java compiler and thus the checking of unchecked exception could be 
missed.

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

PR Comment: https://git.openjdk.org/jdk/pull/13466#issuecomment-1540501498

Reply via email to