24 April 2024
Alex Miller
Clojure 1.11.3 is now available.
CLJ-2843 - Reflective calls to Java methods that take primitive long or double now work when passed a narrower boxed number at runtime (Integer, Short, Byte, Float). Previously, these methods were not matched during reflection and an error was thrown.
Java 21 added an overload to the method Thread/sleep
in the 1-arity. When upgrading to Java 21, existing Clojure calls to Thread/sleep
become reflective, but continue to work. As usual, you can detect reflection with *warn-on-reflection*
and address with a type hint (here, ^long
) to choose the desired overload. Previously, passing a Short or Integer value to a reflective call like Thread/sleep
that takes a long
would not match, that has been corrected.