Le ven. 6 janv. 2023 à 02:18, Alex Herbert a écrit :
>
> Note there is an isFinite method.
>
> if (!Double.isFinite(x)) {
> ...
>
> The isFinite method is a JVM intrinsic method in JDK 20. It was added
> in JDK 8 so can be used in [math].
Thanks.
>
> PMD rules would also change this to a forEach
Note there is an isFinite method.
if (!Double.isFinite(x)) {
...
The isFinite method is a JVM intrinsic method in JDK 20. It was added
in JDK 8 so can be used in [math].
PMD rules would also change this to a forEach loop:
> +for (double x : value) {
> +if (!Double.isFinite(x