[
http://issues.apache.org/jira/browse/BEEHIVE-957?page=comments#action_12375638
]
matt c commented on BEEHIVE-957:
--------------------------------
Verified fixed using local beehive build synced to SVN 393036, and creating an
annotation and control extension with the following format:
@PropertySet
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface BadDateTestAnno {
@AnnotationMemberTypes.Date(format="yyyy-MM-dd", minValue="2005-01-31",
maxValue="2007-12-31")
String date();
}
@BadDateTestAnno(date="2006-02-311")
public void aMethod();
Results in this error:
A value assigned to a control property does not satisfy its constraints. Cause:
The value, 2006-02-311, assigned to a date property is not in the specified
format of: yyyy-MM-dd
Variations tried:
2006-02-20 //succeeds
2006-02-55 //fails
2006-02-xx //fails
Verified that this bug has been fixed. Verified by reviewing the developer's
test case and by creating a manual test.
This bug may be closed.
> Validation on AnnotationMemberTypes.Date is allowing invalid value
> ------------------------------------------------------------------
>
> Key: BEEHIVE-957
> URL: http://issues.apache.org/jira/browse/BEEHIVE-957
> Project: Beehive
> Type: Bug
> Components: Controls
> Versions: V1
> Environment: Windows JDK 1.5 03
> Reporter: David Read
> Assignee: Eddie O'Neil
> Priority: Minor
> Fix For: 1.0.1
> Attachments: BEEHIVE-957.diff
>
> This compiles, but I don't think it should ...
> An annotation definition with a member:
> ===============================
> @AnnotationMemberTypes.Date(format="yyyy-MM-dd",
> minValue="2005-01-31", maxValue="2005-12-31")
> String date();
> And a annotation instance of:
> =======================
> @ConstrainedProperties.Properties(
> ...
> date="2005-09-30x",
> ....
> )
> Retriving the member value at runtime returns: 2005-09-30x as a String and
> fails to parse at runtime. I do get a compilation error if the basic format
> is not correct. For example using date="2005/09/30x".
> It would also be helpful if the error messages indicate what the current
> value and parse format is. The current error generation is:
> error("Value assigned to a date property is not in the specified format.");
> maybe something like ... error("Value:"+ value + " assigned to a date
> property is not in the specified format:"+format);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira