From c978fb446604ef5435d8585a80b34d156ff74d72 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 9 Mar 2021 16:57:04 +0100 Subject: [PATCH] Documentation fixes etc (backported from master) --- .../context/event/SourceFilteringListener.java | 4 ++-- .../web/servlet/handler/MatchableHandlerMapping.java | 4 ++-- src/docs/asciidoc/core/core-beans.adoc | 4 ++-- src/docs/asciidoc/core/core-validation.adoc | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java b/spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java index c6e52df056b..e0f9e95a103 100644 --- a/spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java +++ b/spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 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. @@ -81,7 +81,7 @@ public class SourceFilteringListener implements GenericApplicationListener, Smar @Override public boolean supportsEventType(Class eventType) { - return supportsEventType(ResolvableType.forType(eventType)); + return supportsEventType(ResolvableType.forClass(eventType)); } @Override diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/MatchableHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/MatchableHandlerMapping.java index 2c704124479..75c5a4f71df 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/MatchableHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/MatchableHandlerMapping.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -33,7 +33,7 @@ import org.springframework.web.servlet.HandlerMapping; public interface MatchableHandlerMapping extends HandlerMapping { /** - * Determine whether the given request matches the request criteria. + * Determine whether the request matches the given pattern. * @param request the current request * @param pattern the pattern to match * @return the result from request matching, or {@code null} if none diff --git a/src/docs/asciidoc/core/core-beans.adoc b/src/docs/asciidoc/core/core-beans.adoc index 630599998c5..6af0c617a57 100644 --- a/src/docs/asciidoc/core/core-beans.adoc +++ b/src/docs/asciidoc/core/core-beans.adoc @@ -10803,7 +10803,7 @@ The following example shows how our notifier can be rewritten to be invoked only .Java ---- @EventListener(condition = "#blEvent.content == 'my-event'") - public void processBlockedListEvent(BlockedListEvent blockedListEvent) { + public void processBlockedListEvent(BlockedListEvent blEvent) { // notify appropriate parties via notificationAddress... } ---- @@ -10811,7 +10811,7 @@ The following example shows how our notifier can be rewritten to be invoked only .Kotlin ---- @EventListener(condition = "#blEvent.content == 'my-event'") - fun processBlockedListEvent(blockedListEvent: BlockedListEvent) { + fun processBlockedListEvent(blEvent: BlockedListEvent) { // notify appropriate parties via notificationAddress... } ---- diff --git a/src/docs/asciidoc/core/core-validation.adoc b/src/docs/asciidoc/core/core-validation.adoc index 1ac316cdc32..5f1f75df614 100644 --- a/src/docs/asciidoc/core/core-validation.adoc +++ b/src/docs/asciidoc/core/core-validation.adoc @@ -1085,8 +1085,8 @@ on the target field, or you might want to run a `Converter` only if a specific m interface ConditionalGenericConverter : GenericConverter, ConditionalConverter ---- -A good example of a `ConditionalGenericConverter` is an `EntityConverter` that converts -between a persistent entity identifier and an entity reference. Such an `EntityConverter` +A good example of a `ConditionalGenericConverter` is an `IdToEntityConverter` that converts +between a persistent entity identifier and an entity reference. Such an `IdToEntityConverter` might match only if the target entity type declares a static finder method (for example, `findAccount(Long)`). You might perform such a finder method check in the implementation of `matches(TypeDescriptor, TypeDescriptor)`.