mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-27 07:10:45 +00:00
6908218: java.lang.Deprecated should have explicit @Target meta-annotation
Reviewed-by: mernst
This commit is contained in:
parent
74703b4493
commit
738b0c0ec7
@ -26,6 +26,7 @@
|
||||
package java.lang;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
|
||||
/**
|
||||
* A program element annotated @Deprecated is one that programmers
|
||||
@ -38,5 +39,6 @@ import java.lang.annotation.*;
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(value={CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE})
|
||||
public @interface Deprecated {
|
||||
}
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
package java.lang;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import java.lang.annotation.ElementType;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
|
||||
/**
|
||||
@ -45,7 +44,7 @@ import static java.lang.annotation.ElementType.*;
|
||||
* @since 1.5
|
||||
* @author Josh Bloch
|
||||
*/
|
||||
@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
|
||||
@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, TYPE_PARAMETER})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface SuppressWarnings {
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user