[arquillian-issues] [JBoss JIRA] (ARQ-941) Make Exception.class default for value attribute on @ShouldThrowException
Aslak Knutsen (JIRA)
jira-events at lists.jboss.org
Mon May 13 16:23:06 EDT 2013
[ https://issues.jboss.org/browse/ARQ-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aslak Knutsen updated ARQ-941:
------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 1.0.4.Final
(was: 2.0.0.Beta1)
Resolution: Done
pushed upstream: https://github.com/arquillian/arquillian-core/commit/455fd072111d9e99e93f2ba795bf264be68905ee
> Make Exception.class default for value attribute on @ShouldThrowException
> -------------------------------------------------------------------------
>
> Key: ARQ-941
> URL: https://issues.jboss.org/browse/ARQ-941
> Project: Arquillian
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Base Implementation
> Reporter: Dan Allen
> Priority: Minor
> Labels: starter
> Fix For: 1.0.4.Final
>
>
> The annotation @ShouldThrowException is expressive enough to be understood as meaning a generic Exception will be thrown (during deployment) unless a more specific exception is specified.
> Therefore, a default should be specified for the value attribute such that:
> @ShouldThrowException == @ShouldThrowException(Exception.class)
> Here's the resulting annotation definition:
> {code:java}
> @Documented
> @Retention(RUNTIME)
> @Target(ElementType.METHOD)
> public @interface ShouldThrowException {
> Class<? extends Exception> value() default Exception.class;
> }
> {code}
> (Alternatively, the default can be Throwable.class, though the value of least surprise is likely Exception.class).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the arquillian-issues
mailing list