[jboss-jira] [JBoss JIRA] Closed: (JBCOMMON-26) Error handling in property editors for null values
Dimitris Andreadis (JIRA)
jira-events at lists.jboss.org
Tue Sep 25 10:11:41 EDT 2007
[ http://jira.jboss.com/jira/browse/JBCOMMON-26?page=all ]
Dimitris Andreadis closed JBCOMMON-26.
--------------------------------------
Fix Version/s: 2.2.2.GA
2.0.6.GA
1.2.1.GA
1.0.5.GA
Resolution: Done
Assignee: Dimitris Andreadis
Allow setValue(null) for the java.util.Date property editor. All the other property editors allows this operation.
> Error handling in property editors for null values
> --------------------------------------------------
>
> Key: JBCOMMON-26
> URL: http://jira.jboss.com/jira/browse/JBCOMMON-26
> Project: JBoss Common
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: common-old, common-core
> Reporter: Adrian Brock
> Assigned To: Dimitris Andreadis
> Fix For: 2.2.2.GA, 2.0.6.GA, 1.2.1.GA, 1.0.5.GA
>
>
> 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