[
https://issues.apache.org/jira/browse/MATH-1629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gilles Sadowski resolved MATH-1629.
-----------------------------------
Resolution: Done
Commit 39c47671f29b7c39e33931655f8d0833e10576c2 ("master" branch).
> ArithmeticException vs MathArithmeticException
> ----------------------------------------------
>
> Key: MATH-1629
> URL: https://issues.apache.org/jira/browse/MATH-1629
> Project: Commons Math
> Issue Type: Task
> Reporter: Gilles Sadowski
> Assignee: Gilles Sadowski
> Priority: Trivial
> Labels: api, jdk, math
> Fix For: 4.0
>
>
> Some
> [{{AccurateMath}}|https://gitbox.apache.org/repos/asf?p=commons-math.git;a=blob;f=commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMath.java;h=88d15372936200dc8430864503014b341b582c48;hb=HEAD]
> methods throw
> [{{MathArithmeticException}}|https://gitbox.apache.org/repos/asf?p=commons-math.git;a=blob;f=commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/MathArithmeticException.java;h=64f9d70368c3ed183dbb9bf5b47574995accc0a5;hb=HEAD]
> which is not a subclass of
> [{{ArithmeticException}}|https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html].
> In those methods, I propose to throw {{ArithmeticException}} instead, which
> goes along {{AccurateMath}} being a "drop-in" replacement of the JDK's
> {{Math}} class.
> Once the dependency on {{commons-math-legacy-exception}} is dropped, the
> class can be moved to module {{commons-math-core}}.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)