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 (JIRA)" <ji...@apache.org> on 2010/12/09 19:38:01 UTC
[jira] Created: (MATH-458) Interpolators: Remove "MathException"
from the signature of the "interpolate" method
Interpolators: Remove "MathException" from the signature of the "interpolate" method
------------------------------------------------------------------------------------
Key: MATH-458
URL: https://issues.apache.org/jira/browse/MATH-458
Project: Commons Math
Issue Type: Bug
Reporter: Gilles
Priority: Minor
Fix For: 3.0
The interfaces for the interpolators contain a "throws" clause that should be removed.
E.g.
{code}
public interface UnivariateRealInterpolator {
/**
* Computes an interpolating function for the data set.
* @param xval the arguments for the interpolation points
* @param yval the values for the interpolation points
* @return a function which interpolates the data set
* @throws MathException if arguments violate assumptions made by the
* interpolation algorithm
*/
UnivariateRealFunction interpolate(double xval[], double yval[])
throws MathException;
}
{code}
Assumptions violation should be dealt with by throwing appropriate unchecked exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-458) Interpolators: Remove "MathException"
from the signature of the "interpolate" method
Posted by "Michael Yannakopoulos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977292#action_12977292 ]
Michael Yannakopoulos commented on MATH-458:
--------------------------------------------
Excuse me, but why interfaces for the interpolators shoudn't contain a "throws" clause? The appropriate unchecked exceptions are shown by the stack trace... Sorry for not understanding what would you like to be done...
> Interpolators: Remove "MathException" from the signature of the "interpolate" method
> ------------------------------------------------------------------------------------
>
> Key: MATH-458
> URL: https://issues.apache.org/jira/browse/MATH-458
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Fix For: 3.0
>
>
> The interfaces for the interpolators contain a "throws" clause that should be removed.
> E.g.
> {code}
> public interface UnivariateRealInterpolator {
> /**
> * Computes an interpolating function for the data set.
> * @param xval the arguments for the interpolation points
> * @param yval the values for the interpolation points
> * @return a function which interpolates the data set
> * @throws MathException if arguments violate assumptions made by the
> * interpolation algorithm
> */
> UnivariateRealFunction interpolate(double xval[], double yval[])
> throws MathException;
> }
> {code}
> Assumptions violation should be dealt with by throwing appropriate unchecked exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-458) Interpolators: Remove "MathException"
from the signature of the "interpolate" method
Posted by "Michael Yannakopoulos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978447#action_12978447 ]
Michael Yannakopoulos commented on MATH-458:
--------------------------------------------
Just if you are interested i have modified the classes that were affected by this exception and i have changed the exception to "MathRuntimeException"... If you need them i would likely attached these files...
> Interpolators: Remove "MathException" from the signature of the "interpolate" method
> ------------------------------------------------------------------------------------
>
> Key: MATH-458
> URL: https://issues.apache.org/jira/browse/MATH-458
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Fix For: 3.0
>
>
> The interfaces for the interpolators contain a "throws" clause that should be removed.
> E.g.
> {code}
> public interface UnivariateRealInterpolator {
> /**
> * Computes an interpolating function for the data set.
> * @param xval the arguments for the interpolation points
> * @param yval the values for the interpolation points
> * @return a function which interpolates the data set
> * @throws MathException if arguments violate assumptions made by the
> * interpolation algorithm
> */
> UnivariateRealFunction interpolate(double xval[], double yval[])
> throws MathException;
> }
> {code}
> Assumptions violation should be dealt with by throwing appropriate unchecked exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-458) Interpolators: Remove "MathException"
from the signature of the "interpolate" method
Posted by "Michael Yannakopoulos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977834#action_12977834 ]
Michael Yannakopoulos commented on MATH-458:
--------------------------------------------
So if we just changed the "throws MathException" statement with "throws MathRuntimeException" statement then the new implementation would be compatible with the new standards? Thanks in advance Gilles!
> Interpolators: Remove "MathException" from the signature of the "interpolate" method
> ------------------------------------------------------------------------------------
>
> Key: MATH-458
> URL: https://issues.apache.org/jira/browse/MATH-458
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Fix For: 3.0
>
>
> The interfaces for the interpolators contain a "throws" clause that should be removed.
> E.g.
> {code}
> public interface UnivariateRealInterpolator {
> /**
> * Computes an interpolating function for the data set.
> * @param xval the arguments for the interpolation points
> * @param yval the values for the interpolation points
> * @return a function which interpolates the data set
> * @throws MathException if arguments violate assumptions made by the
> * interpolation algorithm
> */
> UnivariateRealFunction interpolate(double xval[], double yval[])
> throws MathException;
> }
> {code}
> Assumptions violation should be dealt with by throwing appropriate unchecked exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-458) Interpolators: Remove "MathException"
from the signature of the "interpolate" method
Posted by "Gilles (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978585#action_12978585 ]
Gilles commented on MATH-458:
-----------------------------
I'm not sure of what you mean and what need to be changed. Please attach the "diff" files.
> Interpolators: Remove "MathException" from the signature of the "interpolate" method
> ------------------------------------------------------------------------------------
>
> Key: MATH-458
> URL: https://issues.apache.org/jira/browse/MATH-458
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Fix For: 3.0
>
>
> The interfaces for the interpolators contain a "throws" clause that should be removed.
> E.g.
> {code}
> public interface UnivariateRealInterpolator {
> /**
> * Computes an interpolating function for the data set.
> * @param xval the arguments for the interpolation points
> * @param yval the values for the interpolation points
> * @return a function which interpolates the data set
> * @throws MathException if arguments violate assumptions made by the
> * interpolation algorithm
> */
> UnivariateRealFunction interpolate(double xval[], double yval[])
> throws MathException;
> }
> {code}
> Assumptions violation should be dealt with by throwing appropriate unchecked exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MATH-458) Interpolators: Remove "MathException"
from the signature of the "interpolate" method
Posted by "Gilles (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gilles resolved MATH-458.
-------------------------
Resolution: Fixed
Revision 1055931.
> Interpolators: Remove "MathException" from the signature of the "interpolate" method
> ------------------------------------------------------------------------------------
>
> Key: MATH-458
> URL: https://issues.apache.org/jira/browse/MATH-458
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Fix For: 3.0
>
>
> The interfaces for the interpolators contain a "throws" clause that should be removed.
> E.g.
> {code}
> public interface UnivariateRealInterpolator {
> /**
> * Computes an interpolating function for the data set.
> * @param xval the arguments for the interpolation points
> * @param yval the values for the interpolation points
> * @return a function which interpolates the data set
> * @throws MathException if arguments violate assumptions made by the
> * interpolation algorithm
> */
> UnivariateRealFunction interpolate(double xval[], double yval[])
> throws MathException;
> }
> {code}
> Assumptions violation should be dealt with by throwing appropriate unchecked exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-458) Interpolators: Remove "MathException"
from the signature of the "interpolate" method
Posted by "Gilles (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978273#action_12978273 ]
Gilles commented on MATH-458:
-----------------------------
Yes but it's unnecessary. Some would argue that having runtime exceptions declared in the "throws" clause is confusing because
it is not guaranteed that only those exceptions listed there will be thrown, and not even that these exceptions will be thrown at all.
> Interpolators: Remove "MathException" from the signature of the "interpolate" method
> ------------------------------------------------------------------------------------
>
> Key: MATH-458
> URL: https://issues.apache.org/jira/browse/MATH-458
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Fix For: 3.0
>
>
> The interfaces for the interpolators contain a "throws" clause that should be removed.
> E.g.
> {code}
> public interface UnivariateRealInterpolator {
> /**
> * Computes an interpolating function for the data set.
> * @param xval the arguments for the interpolation points
> * @param yval the values for the interpolation points
> * @return a function which interpolates the data set
> * @throws MathException if arguments violate assumptions made by the
> * interpolation algorithm
> */
> UnivariateRealFunction interpolate(double xval[], double yval[])
> throws MathException;
> }
> {code}
> Assumptions violation should be dealt with by throwing appropriate unchecked exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-458) Interpolators: Remove "MathException"
from the signature of the "interpolate" method
Posted by "Gilles (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977312#action_12977312 ]
Gilles commented on MATH-458:
-----------------------------
One of the changes we set to implement in 3.0 is that all exceptions in Commons-Math will be unchecked. And in fact they will all inherit from a single {{MathRuntimeException}} base class (defined in the package {{exception}}).
The checked {{MathException}} will be removed.
> Interpolators: Remove "MathException" from the signature of the "interpolate" method
> ------------------------------------------------------------------------------------
>
> Key: MATH-458
> URL: https://issues.apache.org/jira/browse/MATH-458
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Fix For: 3.0
>
>
> The interfaces for the interpolators contain a "throws" clause that should be removed.
> E.g.
> {code}
> public interface UnivariateRealInterpolator {
> /**
> * Computes an interpolating function for the data set.
> * @param xval the arguments for the interpolation points
> * @param yval the values for the interpolation points
> * @return a function which interpolates the data set
> * @throws MathException if arguments violate assumptions made by the
> * interpolation algorithm
> */
> UnivariateRealFunction interpolate(double xval[], double yval[])
> throws MathException;
> }
> {code}
> Assumptions violation should be dealt with by throwing appropriate unchecked exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (MATH-458) Interpolators: Remove
"MathException" from the signature of the "interpolate" method
Posted by "Michael Yannakopoulos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978447#action_12978447 ]
Michael Yannakopoulos edited comment on MATH-458 at 1/6/11 2:11 PM:
--------------------------------------------------------------------
Just if you are interested i have modified the classes that were affected by this exception and i have changed the exception to "MathRuntimeException"... If you need them i would gladly attached these files...
was (Author: miccagiann):
Just if you are interested i have modified the classes that were affected by this exception and i have changed the exception to "MathRuntimeException"... If you need them i would likely attached these files...
> Interpolators: Remove "MathException" from the signature of the "interpolate" method
> ------------------------------------------------------------------------------------
>
> Key: MATH-458
> URL: https://issues.apache.org/jira/browse/MATH-458
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Fix For: 3.0
>
>
> The interfaces for the interpolators contain a "throws" clause that should be removed.
> E.g.
> {code}
> public interface UnivariateRealInterpolator {
> /**
> * Computes an interpolating function for the data set.
> * @param xval the arguments for the interpolation points
> * @param yval the values for the interpolation points
> * @return a function which interpolates the data set
> * @throws MathException if arguments violate assumptions made by the
> * interpolation algorithm
> */
> UnivariateRealFunction interpolate(double xval[], double yval[])
> throws MathException;
> }
> {code}
> Assumptions violation should be dealt with by throwing appropriate unchecked exceptions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.