On Tue, 22 Nov 2022 17:11:44 GMT, Weijun Wang <[email protected]> wrote:
>> src/java.base/share/classes/javax/security/auth/Subject.java line 329:
>>
>>> 327: * subject is {@code null} before the first call of {@code
>>> callAs()}.
>>> 328: * <p>
>>> 329: * When a new thread is created, its current subject is the same as
>>
>> what about change from"when" to "if", in case some implementation still
>> create a new thread?
>
> This is not about the implementation of this method, which might or might not
> allow the current subject to be inherited in a new thread. The spec change is
> telling the users of this method that such inheritance is no longer
> guaranteed. We are still not sure if the future implementation of this method
> can guarantee that, but given it's already broken now, we'd better remove
> this requirement. We can add if later if we can do that.
Hm, it may still apply if the current subject to be inherited in a new thread.
I fine to remove this section. A release note and known issue may be filed to
notify the behavior change and issue.
-------------
PR: https://git.openjdk.org/jdk/pull/11292