Made 'Throwable.class' the default for SneakyThrows.

This commit is contained in:
Reinier Zwitserloot committed 2009-07-08 23:47:43 +02:00
1 parent f6778b0426
commit 58d0ada6d7
1 file changed
+4 -1
+4 -1
View File
@@ -58,11 +58,14 @@ import java.lang.annotation.Target;
* }
* </pre>
*
* <code>&#64;SneakyThrows</code> without a parameter defaults to allowing <i>every</i> checked exception.
* (The default is <code>Throwable.class</code>).
*
* @see Lombok#sneakyThrow(Throwable)
*/
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
@Retention(RetentionPolicy.SOURCE)
public @interface SneakyThrows {
/** The exception type(s) you want to sneakily throw onward. */
Class<? extends Throwable>[] value();
Class<? extends Throwable>[] value() default Throwable.class;
}