commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CSV-113) Check whether ISE/IAE are being used appropriately
Date Wed, 07 May 2014 00:34:15 GMT

    [ https://issues.apache.org/jira/browse/CSV-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13991410#comment-13991410
] 

Sebb commented on CSV-113:
--------------------------

The validate() Javadoc says it validates the parameters; it checks the stored values to make
sure they are self-consistent. It is not a public method; it is basically an implicit build()
method for the fluent API.

Since the values are directly derived from the arguments to the withXXX() methods, I think
it is more natural to expect IAE here, rather than ISE. The values don't constitute state,
they are just saved arguments.

> Check whether ISE/IAE are being used appropriately
> --------------------------------------------------
>
>                 Key: CSV-113
>                 URL: https://issues.apache.org/jira/browse/CSV-113
>             Project: Commons CSV
>          Issue Type: Task
>            Reporter: Sebb
>             Fix For: Discussion, 1.0
>
>
> The code throws a lot of IllegalStateExceptions (ISE).
> It also throws some IllegalArgumentExceptions (IAE).
> These need reviewing to check that ISE really does apply to the current state, and IAE
is used for reporting an incorrect argument.
> Generally if ISE applies, no argument values will be valid.
> IAE should be used when a specific argument or set of arguments is invalid.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message