From cdda5e48f80f7f60902c935c9def4161b1ee1a71 Mon Sep 17 00:00:00 2001 From: Lee Read Date: Wed, 30 Nov 2022 12:12:42 -0500 Subject: [PATCH] Address JDK 19 Thread/sleep Clojure interop (#504) * Address JDK 19 Thread/sleep Clojure interop JDK 19's Thread/sleep now also accepts a Duration. Add a ^long type hint to remove this new ambiguity for Clojure interop. Closes #503 * docs: update change log --- CHANGELOG.adoc | 2 ++ src/etaoin/api.clj | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 0e64ffb6..cd4b8cac 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -7,6 +7,8 @@ A release with an intentional breaking changes is marked with: == Unreleased +* https://github.com/clj-commons/etaoin/issues/503[#503]: Address Clojure interop issue introduced by new Thread/sleep signature in JDK 19 + == v1.0.38 [minor breaking] Minor Breaking Changes diff --git a/src/etaoin/api.clj b/src/etaoin/api.clj index 8cd675e8..8d1c1d97 100644 --- a/src/etaoin/api.clj +++ b/src/etaoin/api.clj @@ -2453,7 +2453,7 @@ (#_{:clj-kondo/ignore [:unused-binding]} [driver seconds] (wait seconds)) ([seconds] - (Thread/sleep (* seconds 1000)))) + (Thread/sleep ^long (* seconds 1000)))) (defmacro with-wait "Execute `body` waiting `seconds` before each form.