RFR: 8360979: Remove use of Thread.stop in krb5/auto/KDC.java [v2]
Mikhail Yankelevich
myankelevich at openjdk.org
Mon Jul 21 12:04:40 UTC 2025
On Mon, 21 Jul 2025 11:54:13 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:
>> Mikhail Yankelevich has updated the pull request incrementally with one additional commit since the last revision:
>>
>> breaking the loop when interrupt flag is set
>
> test/jdk/sun/security/krb5/auto/KDC.java line 1561:
>
>> 1559: q.put(new Job(processMessage(Arrays.copyOf(inbuf, p.getLength())), udp, p));
>> 1560: } catch (InterruptedException e){
>> 1561: break; // Thread was stopped, so stopping the loop
>
> The comments are probably unnecessary; the InterruptedException tells us that the thread was stopped/interrupted.
I would disagree, this seems to be a common mistake in my experience. While this is obvious, it helps to draw the developer's attention, in case the code is ever changed
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26247#discussion_r2218991463
More information about the security-dev
mailing list