On Thu, 20 Apr 2023 08:12:50 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/Thread.java line 1: >> >>> 1: /* >> >> Why doesn't `Thread.sleep(long millis)` simply call `Thread.sleep(millis, >> 0)` instead of duplicating most of the code? > > That would change the stack depth, for which some tests are sensitive. > https://github.com/openjdk/jdk/pull/13225#issuecomment-1514461529. I think > merging `sleep` implementations is something to do in a targeted cleanup, > which would handle those test updates too. One this change is in, I'd like to do some refactoring and have a private sleepNanos that the 3 sleep methods call with the nanos value. That will change the stack depth so it means a few tests need update, but we know what they are now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13225#discussion_r1173391987