On Fri, 13 Nov 2026 12:51:12 GMT, Volkan Yazici <[email protected]> wrote:

> Switch `jdk.httpserver` from wall clock to a monotonic one. This effectively 
> fixes elapsed time measurements and scheduled event fire instants. Bonus: 
> improves the test stability.
> 
> In short, replaced the `System.currentTimeMillis()` & `java.util.Timer` 
> combination with the `System.nanoTime()` & `ScheduledExecutorService` 
> alternative.
> 
> ---------
> - [X] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java line 1143:

> 1141:                 logger.log(Level.ERROR, message, throwable);
> 1142:                 // Rethrow to cancel the execution of the task
> 1143:                 throw new RuntimeException(message, throwable);

"Task cancellation on failure" is introduced to match the old behavior by 
`java.util.Timer`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/33890#discussion_r4564107669

Reply via email to