From 7e3a4a12f8d0fc5229d418086df36874e9b5c69d Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Fri, 24 May 2024 15:19:30 +0200 Subject: [PATCH] Use consistent version strings for 6.2 --- framework-docs/modules/ROOT/pages/core/aot.adoc | 2 +- .../docs/core/aot/hints/testing/SampleReflection.java | 4 ++-- .../springframework/web/bind/annotation/ExceptionHandler.java | 4 ++-- .../web/method/annotation/ExceptionHandlerMappingInfo.java | 4 +++- .../web/method/annotation/ExceptionHandlerMethodResolver.java | 2 +- .../method/annotation/RequestMappingHandlerAdapter.java | 4 ++-- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/core/aot.adoc b/framework-docs/modules/ROOT/pages/core/aot.adoc index 88e5c169e47..5a15c6e23af 100644 --- a/framework-docs/modules/ROOT/pages/core/aot.adoc +++ b/framework-docs/modules/ROOT/pages/core/aot.adoc @@ -561,7 +561,7 @@ If you forgot to contribute a hint, the test will fail and provide some details [source,txt,indent=0,subs="verbatim,quotes"] ---- org.springframework.docs.core.aot.hints.testing.SampleReflection performReflection -INFO: Spring version:6.0.0-SNAPSHOT +INFO: Spring version: 6.2.0 Missing <"ReflectionHints"> for invocation with arguments ["org.springframework.core.SpringVersion", diff --git a/framework-docs/src/main/java/org/springframework/docs/core/aot/hints/testing/SampleReflection.java b/framework-docs/src/main/java/org/springframework/docs/core/aot/hints/testing/SampleReflection.java index 93abd52e85a..2772146e71e 100644 --- a/framework-docs/src/main/java/org/springframework/docs/core/aot/hints/testing/SampleReflection.java +++ b/framework-docs/src/main/java/org/springframework/docs/core/aot/hints/testing/SampleReflection.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ public class SampleReflection { Class springVersion = ClassUtils.forName("org.springframework.core.SpringVersion", null); Method getVersion = ClassUtils.getMethod(springVersion, "getVersion"); String version = (String) getVersion.invoke(null); - logger.info("Spring version:" + version); + logger.info("Spring version: " + version); } catch (Exception exc) { logger.error("reflection failed", exc); diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java index 4f058a05be3..12f0c70b8a3 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java @@ -123,14 +123,14 @@ public @interface ExceptionHandler { /** * Exceptions handled by the annotated method. If empty, will default to any * exceptions listed in the method argument list. - * @since 6.2.0 + * @since 6.2 */ @AliasFor("value") Class[] exception() default {}; /** * Media Types that can be produced by the annotated method. - * @since 6.2.0 + * @since 6.2 */ String[] produces() default {}; diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMappingInfo.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMappingInfo.java index 4dce05c4fba..078ede21d5c 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMappingInfo.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMappingInfo.java @@ -30,7 +30,7 @@ import org.springframework.util.Assert; *
  • the method in charge of handling the exception * * @author Brian Clozel - * @since 6.2.0 + * @since 6.2 */ public class ExceptionHandlerMappingInfo { @@ -40,6 +40,7 @@ public class ExceptionHandlerMappingInfo { private final Method handlerMethod; + ExceptionHandlerMappingInfo(Set> exceptionTypes, Set producibleMediaTypes, Method handlerMethod) { Assert.notNull(exceptionTypes, "exceptionTypes should not be null"); Assert.notNull(producibleMediaTypes, "producibleMediaTypes should not be null"); @@ -49,6 +50,7 @@ public class ExceptionHandlerMappingInfo { this.handlerMethod = handlerMethod; } + /** * Return the method responsible for handling the exception. */ diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java index 597ce8cdf50..e20fcacbf84 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java @@ -186,7 +186,7 @@ public class ExceptionHandlerMethodResolver { * @param exception the exception * @param mediaType the media type requested by the HTTP client * @return a Method to handle the exception, or {@code null} if none found - * @since 6.2.0 + * @since 6.2 */ @Nullable public ExceptionHandlerMappingInfo resolveExceptionMapping(Throwable exception, MediaType mediaType) { diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/RequestMappingHandlerAdapter.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/RequestMappingHandlerAdapter.java index 26c7ed5f33f..53b6baf7da1 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/RequestMappingHandlerAdapter.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/RequestMappingHandlerAdapter.java @@ -156,7 +156,7 @@ public class RequestMappingHandlerAdapter /** * Set the {@link RequestedContentTypeResolver} to use to determine requested * media types. If not set, the default constructor is used. - * @since 6.2.0 + * @since 6.2 */ public void setContentTypeResolver(RequestedContentTypeResolver contentTypeResolver) { Assert.notNull(contentTypeResolver, "'contentTypeResolver' must not be null"); @@ -165,7 +165,7 @@ public class RequestMappingHandlerAdapter /** * Return the configured {@link RequestedContentTypeResolver}. - * @since 6.2.0 + * @since 6.2 */ public RequestedContentTypeResolver getContentTypeResolver() { return this.contentTypeResolver;