RFR: 8370568: Refer to Thread.interrupted as "interrupted status" consistently [v4]
Pavel Rappo
prappo at openjdk.org
Wed Oct 29 10:25:59 UTC 2025
> Throughout documentation and source code, the `Thread.interrupted` flag is referred to as either "interrupt**ed** status" or "interrupt status". It might be good to be consistent.
>
> Historically, it seems to have initially been "interrupted status". This is how the flag is called in `java.lang.Thread` and the "Java Concurrency in Practice" book. ("The Java Programming Language" calls it "interrupted **state**".) However, over the years "interrupt status" appeared in documentation and source code through networking and NIO classes.
Pavel Rappo has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
- Fix one more occurrence
- Merge remote-tracking branch 'jdk/master' into 8370568
- Merge remote-tracking branch 'jdk/master' into 8370568
- Update copyright years
Note: any commit hashes below might be outdated due to subsequent
history rewriting (e.g. git rebase).
+ update make/langtools/tools/javacserver/server/CompilerThreadPool.java due to a10f8b4304d
+ update src/java.base/share/classes/java/lang/Object.java due to a10f8b4304d
+ update src/java.base/share/classes/java/net/DatagramSocket.java due to a6a23d6fdaf
+ update src/java.base/share/classes/java/net/ServerSocket.java due to a6a23d6fdaf
+ update src/java.base/share/classes/java/nio/channels/DatagramChannel.java due to a10f8b4304d
+ update src/java.base/share/classes/java/nio/channels/FileChannel.java due to a10f8b4304d
+ update src/java.base/share/classes/java/nio/channels/InterruptibleChannel.java due to a10f8b4304d
+ update src/java.base/share/classes/java/nio/channels/ReadableByteChannel.java due to a10f8b4304d
+ update src/java.base/share/classes/java/nio/channels/ScatteringByteChannel.java due to a10f8b4304d
+ update src/java.base/share/classes/java/nio/channels/Selector.java due to a10f8b4304d
+ update src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java due to a10f8b4304d
+ update src/java.base/share/classes/java/nio/channels/SocketChannel.java due to a10f8b4304d
+ update src/java.base/share/classes/sun/nio/ch/Interruptible.java due to a10f8b4304d
+ update src/java.base/share/classes/sun/security/ssl/StatusResponseManager.java due to a10f8b4304d
+ update src/java.desktop/share/classes/java/awt/Robot.java due to a10f8b4304d
+ update src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DOMParserImpl.java due to a10f8b4304d
+ update src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpChannel.java due to a10f8b4304d
+ update src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpMultiChannel.java due to a10f8b4304d
+ update src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpServerChannel.java due to a10f8b4304d
+ update test/hotspot/jtreg/serviceability/jvmti/vthread/GetThreadState/GetThreadStateTest.java due to a10f8b4304d
+ update test/hotspot/jtreg/vmTestbase/nsk/jvmti/InterruptThread/intrpthrd001/TestDescription.java due to a10f8b4304d
+ update test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/newclass02/java.base/java/lang/Object.java due to a10f8b4304d
+ update test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t002/TestDescription.java due to a10f8b4304d
+ update test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t003/TestDescription.java due to a10f8b4304d
+ update test/hotspot/jtreg/vmTestbase/nsk/share/gc/AllDiag.java due to a10f8b4304d
+ update test/hotspot/jtreg/vmTestbase/nsk/share/gc/FinDiag.java due to a10f8b4304d
+ update test/hotspot/jtreg/vmTestbase/nsk/share/runner/MemDiag.java due to a10f8b4304d
+ update test/jdk/java/lang/Thread/JoinWithDuration.java due to a10f8b4304d
+ update test/jdk/java/lang/Thread/SleepWithDuration.java due to a10f8b4304d
+ update test/jdk/java/lang/Thread/virtual/CustomScheduler.java due to a6a23d6fdaf
+ update test/jdk/java/nio/channels/Channels/SocketChannelStreams.java due to a10f8b4304d
+ update test/jdk/java/nio/channels/FileChannel/CloseDuringTransfer.java due to a10f8b4304d
+ update test/jdk/java/nio/channels/FileChannel/ClosedByInterrupt.java due to a10f8b4304d
+ update test/jdk/java/nio/channels/Pipe/PipeInterrupt.java due to a10f8b4304d
+ update test/jdk/java/nio/channels/Selector/LotsOfInterrupts.java due to a10f8b4304d
+ update test/jdk/java/nio/channels/Selector/SelectWithConsumer.java due to a10f8b4304d
+ update test/jdk/java/nio/channels/Selector/WakeupAfterClose.java due to a10f8b4304d
+ update test/jdk/java/nio/channels/SocketChannel/AdaptorStreams.java due to a10f8b4304d
+ update test/jdk/java/nio/file/Files/CallWithInterruptSet.java due to a10f8b4304d
+ update test/jdk/java/nio/file/Files/InterruptCopy.java due to a10f8b4304d
+ update test/jdk/java/util/concurrent/CompletableFuture/LostInterrupt.java due to a10f8b4304d
+ update test/jdk/java/util/concurrent/CompletableFuture/SwallowedInterruptedException.java due to a10f8b4304d
+ update test/jdk/java/util/concurrent/ExecutorService/CloseTest.java due to a10f8b4304d
+ update test/jdk/java/util/concurrent/ExecutorService/InvokeTest.java due to a10f8b4304d
+ update test/jdk/java/util/zip/InterruptibleZip.java due to a10f8b4304d
- Reword for clarity as suggested
- Drop to ease upcoming merge from loom repo
- Initial commit
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27972/files
- new: https://git.openjdk.org/jdk/pull/27972/files/b3297337..32e4c36a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27972&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27972&range=02-03
Stats: 2165 lines in 89 files changed: 1112 ins; 785 del; 268 mod
Patch: https://git.openjdk.org/jdk/pull/27972.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27972/head:pull/27972
PR: https://git.openjdk.org/jdk/pull/27972
More information about the hotspot-gc-dev
mailing list