Allow usage of `@CheckReturnValue` on types and ctors
Closes gh-34910
This commit is contained in:
parent
74ee1b991a
commit
f601bbb2ac
|
@ -33,10 +33,13 @@ import java.lang.annotation.Target;
|
|||
* and the return value is only interesting when adding an element to a set,
|
||||
* to see if the set already contained that element before.
|
||||
*
|
||||
* <p>When used on a type, the annotation applies to all constructors and all
|
||||
* methods that do not return {@code void}.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 6.2
|
||||
*/
|
||||
@Documented
|
||||
@Target(ElementType.METHOD)
|
||||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||
public @interface CheckReturnValue {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue