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/23 18:50:46 UTC

[jira] Created: (MATH-461) RealVectorFormat throws ParseException

RealVectorFormat throws ParseException
--------------------------------------

                 Key: MATH-461
                 URL: https://issues.apache.org/jira/browse/MATH-461
             Project: Commons Math
          Issue Type: Improvement
            Reporter: Gilles
            Assignee: Gilles
            Priority: Minor
             Fix For: 3.0


The {{parseObject(String)}} method, inherited from the standard Java class {{Format}}, throws a _checked_ {{ParseException}}.
A new _runtime_ {{MathParseException}} is to be created to be thrown instead when parsing fails. However, this can cause a problem, as explained on the ML.
I propose that {{CompositeFormat}} becomes an instance variable of {{RealVectorFormat}} (instead of being a base class) to avoid that pitfall.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MATH-461) RealVectorFormat throws ParseException

Posted by "Gilles (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles resolved MATH-461.
-------------------------

    Resolution: Fixed

Revision 1055835.

> RealVectorFormat throws ParseException
> --------------------------------------
>
>                 Key: MATH-461
>                 URL: https://issues.apache.org/jira/browse/MATH-461
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: MATH-461.diff
>
>
> The {{parseObject(String)}} method, inherited from the standard Java class {{Format}}, throws a _checked_ {{ParseException}}.
> A new _runtime_ {{MathParseException}} is to be created to be thrown instead when parsing fails. However, this can cause a problem, as explained on the ML.
> I propose that {{CompositeFormat}} becomes an instance variable of {{RealVectorFormat}} (instead of being a base class) to avoid that pitfall.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MATH-461) RealVectorFormat throws ParseException

Posted by "Gilles (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles updated MATH-461:
------------------------

    Attachment: MATH-461.diff

The {{ComplexFormat}} and {{Vector3DFormat}} classes present the same problem as {{RealVectorFormat}}.
Please have a look at the attached "diff" that shows the proposed changes. In summary: {{CompositeFormat}} becomes a utility class (with a "private" constructor). The various "...Format" classes do not inherit anymore from the "Format" Java class, which allows the removal of some methods (in particular, the one that throws {{ParseException}}).


> RealVectorFormat throws ParseException
> --------------------------------------
>
>                 Key: MATH-461
>                 URL: https://issues.apache.org/jira/browse/MATH-461
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: MATH-461.diff
>
>
> The {{parseObject(String)}} method, inherited from the standard Java class {{Format}}, throws a _checked_ {{ParseException}}.
> A new _runtime_ {{MathParseException}} is to be created to be thrown instead when parsing fails. However, this can cause a problem, as explained on the ML.
> I propose that {{CompositeFormat}} becomes an instance variable of {{RealVectorFormat}} (instead of being a base class) to avoid that pitfall.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.