On Thu, 21 Oct 2021 13:43:40 GMT, Sean Mullan <[email protected]> wrote:
>> OK, but in the ctor `trustedPubKey` is also null.
>
> True, but that's because none of the fields are set yet, so it feels odd for
> the ctor to check if the field is null when it is always true, even if it is
> a different method. What if I create a separate method
> `setTrustAnchor(TrustAnchor)` which the ctor calls, and then change
> `trySetTrustAnchor` to:
>
> if (this.trustedPubKey == null) {
> setTrustAnchor(anchor);
> }
Sounds good.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5928