[jboss-jira] [JBoss JIRA] Deleted: (JBAS-4495) Error handling in property editors for null values

Adrian Brock (JIRA) jira-events at lists.jboss.org
Tue Jun 19 09:19:29 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBAS-4495?page=all ]

Adrian Brock deleted JBAS-4495:
-------------------------------


> Error handling in property editors for null values
> --------------------------------------------------
>
>                 Key: JBAS-4495
>                 URL: http://jira.jboss.com/jira/browse/JBAS-4495
>             Project: JBoss Application Server
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>            Reporter: Adrian Brock
>
> As per the parent task, the error handling for the DateEditor is not handling null values correctly.
>    public void setValue(Object value)
>    {
>       if (value instanceof Date)
>       {
>          text = null;
>          super.setValue(value);
>       }
>       else
>       {
>          throw new IllegalArgumentException("setValue() expected java.util.Date value, got "
>                + value.getClass().getName());
>       }
>    }
> There needs to be an initial
> if (value == null)
>    throw new IllegalArgumentException("Null value for setValue() expected java.util.Date");
> or alternatively (since the javadocs don't disallow null values)
> if (value == null)
>    return null;
> The other property editors need checking for the same problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list