From 43071109f7817d2db4909e3c0b770df6da2fafc2 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 13 Apr 2021 11:48:55 +0200 Subject: [PATCH] Polishing (backported from master) --- .../web/servlet/i18n/AcceptHeaderLocaleResolver.java | 4 ++-- src/docs/asciidoc/core/core-beans.adoc | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java index 2e59931e97d..e5c027e9683 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2021 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. @@ -72,7 +72,7 @@ public class AcceptHeaderLocaleResolver implements LocaleResolver { /** * Configure a fixed default locale to fall back on if the request does not * have an "Accept-Language" header. - *

By default this is not set in which case when there is "Accept-Language" + *

By default this is not set in which case when there is no "Accept-Language" * header, the default locale for the server is used as defined in * {@link HttpServletRequest#getLocale()}. * @param defaultLocale the default locale to use diff --git a/src/docs/asciidoc/core/core-beans.adoc b/src/docs/asciidoc/core/core-beans.adoc index 945887632f4..d731b2bde0c 100644 --- a/src/docs/asciidoc/core/core-beans.adoc +++ b/src/docs/asciidoc/core/core-beans.adoc @@ -10657,9 +10657,8 @@ architectures that build upon the well-known Spring programming model. [[context-functionality-events-annotation]] ==== Annotation-based Event Listeners -As of Spring 4.2, you can register an event listener on any public method of a managed -bean by using the `@EventListener` annotation. The `BlockedListNotifier` can be rewritten as -follows: +You can register an event listener on any method of a managed bean by using the +`@EventListener` annotation. The `BlockedListNotifier` can be rewritten as follows: [source,java,indent=0,subs="verbatim,quotes",role="primary"] .Java @@ -10797,9 +10796,9 @@ method signature to return the event that should be published, as the following NOTE: This feature is not supported for <>. -This new method publishes a new `ListUpdateEvent` for every `BlockedListEvent` handled by the -method above. If you need to publish several events, you can return a `Collection` of events -instead. +The `handleBlockedListEvent()` method publishes a new `ListUpdateEvent` for every +`BlockedListEvent` that it handles. If you need to publish several events, you can return +a `Collection` or an array of events instead. [[context-functionality-events-async]]