You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2021/09/28 18:42:00 UTC

[jira] [Created] (MATH-1629) ArithmeticException vs MathArithmeticException

Gilles Sadowski created MATH-1629:
-------------------------------------

             Summary: 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
             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.3.4#803005)