From 39e1342302178b227493c80bf227961d59c85ead Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 30 Apr 2014 22:51:22 +0200 Subject: [PATCH] Revised definition of @UsesX annotations --- .../main/java/org/springframework/core/UsesJava7.java | 11 ++++++----- .../main/java/org/springframework/core/UsesJava8.java | 10 +++++----- .../org/springframework/core/UsesSunHttpServer.java | 8 ++++---- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/UsesJava7.java b/spring-core/src/main/java/org/springframework/core/UsesJava7.java index ce8619a678..a57929f3bf 100644 --- a/spring-core/src/main/java/org/springframework/core/UsesJava7.java +++ b/spring-core/src/main/java/org/springframework/core/UsesJava7.java @@ -19,17 +19,18 @@ package org.springframework.core; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Indicate that the annotated element uses Java7 specific constructs - * and therefore requires a Java7 environment. + * Indicates that the annotated element uses Java 7 specific API constructs, + * without implying that it strictly requires Java 7. * * @author Stephane Nicoll + * @since 4.1 */ -@Retention(java.lang.annotation.RetentionPolicy.CLASS) -@Documented +@Retention(RetentionPolicy.CLASS) @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE}) +@Documented public @interface UsesJava7 { - } diff --git a/spring-core/src/main/java/org/springframework/core/UsesJava8.java b/spring-core/src/main/java/org/springframework/core/UsesJava8.java index e4bf36db88..21fed13b56 100644 --- a/spring-core/src/main/java/org/springframework/core/UsesJava8.java +++ b/spring-core/src/main/java/org/springframework/core/UsesJava8.java @@ -19,18 +19,18 @@ package org.springframework.core; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Indicate that the annotated element uses Java8 specific constructs - * and therefore requires a Java8 environment. + * Indicates that the annotated element uses Java 8 specific API constructs, + * without implying that it strictly requires Java 8. * * @author Stephane Nicoll * @since 4.1 */ -@Retention(java.lang.annotation.RetentionPolicy.CLASS) -@Documented +@Retention(RetentionPolicy.CLASS) @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE}) +@Documented public @interface UsesJava8 { - } diff --git a/spring-core/src/main/java/org/springframework/core/UsesSunHttpServer.java b/spring-core/src/main/java/org/springframework/core/UsesSunHttpServer.java index a9e66fa604..55e407987d 100644 --- a/spring-core/src/main/java/org/springframework/core/UsesSunHttpServer.java +++ b/spring-core/src/main/java/org/springframework/core/UsesSunHttpServer.java @@ -19,18 +19,18 @@ package org.springframework.core; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Indicate that the annotated element uses the Http Server available in + * Indicates that the annotated element uses the Http Server available in * {@code com.sun.*} classes, which is only available on a Sun/Oracle JVM. * * @author Stephane Nicoll * @since 4.1 */ -@Retention(java.lang.annotation.RetentionPolicy.CLASS) -@Documented +@Retention(RetentionPolicy.CLASS) @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE}) +@Documented public @interface UsesSunHttpServer { - }