Skip to content

Commit 82ca27e

Browse files
marcwrobelsbrannen
authored andcommitted
Fix and improve Javadoc in spring-messaging
See gh-28800
1 parent bca1047 commit 82ca27e

27 files changed

+43
-43
lines changed

spring-messaging/src/main/java/org/springframework/messaging/MessageChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public interface MessageChannel {
3939
* <p>This method may block indefinitely, depending on the implementation.
4040
* To provide a maximum wait time, use {@link #send(Message, long)}.
4141
* @param message the message to send
42-
* @return whether or not the message was sent
42+
* @return whether the message was sent
4343
*/
4444
default boolean send(Message<?> message) {
4545
return send(message, INDEFINITE_TIMEOUT);

spring-messaging/src/main/java/org/springframework/messaging/converter/AbstractMessageConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public ContentTypeResolver getContentTypeResolver() {
127127
* Whether this converter should convert messages for which no content type
128128
* could be resolved through the configured
129129
* {@link org.springframework.messaging.converter.ContentTypeResolver}.
130-
* <p>A converter can configured to be strict only when a
130+
* <p>A converter can be configured to be strict only when a
131131
* {@link #setContentTypeResolver contentTypeResolver} is configured and the
132132
* list of {@link #getSupportedMimeTypes() supportedMimeTypes} is not be empty.
133133
* <p>When this flag is set to {@code true}, {@link #supportsMimeType(MessageHeaders)}

spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/reactive/AbstractNamedValueMethodArgumentResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private Object resolveEmbeddedValuesAndExpressions(String value) {
186186

187187
/**
188188
* Invoked when a value is required, but {@link #resolveArgumentInternal}
189-
* returned {@code null} and there is no default value. Sub-classes can
189+
* returned {@code null} and there is no default value. Subclasses can
190190
* throw an appropriate exception for this case.
191191
* @param name the name for the value
192192
* @param parameter the target method parameter

spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/reactive/MessageMappingMessageHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
/**
6666
* Extension of {@link AbstractMethodMessageHandler} for reactive, non-blocking
6767
* handling of messages via {@link MessageMapping @MessageMapping} methods.
68-
* By default such methods are detected in {@code @Controller} Spring beans but
68+
* By default, such methods are detected in {@code @Controller} Spring beans but
6969
* that can be changed via {@link #setHandlerPredicate(Predicate)}.
7070
*
7171
* <p>Payloads for incoming messages are decoded through the configured
@@ -74,7 +74,7 @@
7474
*
7575
* <p>There is no default handling for return values but
7676
* {@link #setReturnValueHandlerConfigurer} can be used to configure custom
77-
* return value handlers. Sub-classes may also override
77+
* return value handlers. Subclasses may also override
7878
* {@link #initReturnValueHandlers()} to set up default return value handlers.
7979
*
8080
* @author Rossen Stoyanchev

spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AbstractNamedValueMethodArgumentResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ protected abstract Object resolveArgumentInternal(MethodParameter parameter, Mes
198198

199199
/**
200200
* Invoked when a value is required, but {@link #resolveArgumentInternal}
201-
* returned {@code null} and there is no default value. Sub-classes can
201+
* returned {@code null} and there is no default value. Subclasses can
202202
* throw an appropriate exception for this case.
203203
* @param name the name for the value
204204
* @param parameter the target method parameter

spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AnnotationExceptionHandlerMethodResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.springframework.messaging.handler.invocation.AbstractExceptionHandlerMethodResolver;
3030

3131
/**
32-
* A sub-class of {@link AbstractExceptionHandlerMethodResolver} that looks for
32+
* A subclass of {@link AbstractExceptionHandlerMethodResolver} that looks for
3333
* {@link MessageExceptionHandler}-annotated methods in a given class. The actual
3434
* exception types handled are extracted either from the annotation, if present,
3535
* or from the method signature as a fallback option.

spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AbstractExceptionHandlerMethodResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ protected AbstractExceptionHandlerMethodResolver(Map<Class<? extends Throwable>,
6767

6868
/**
6969
* Extract the exceptions this method handles. This implementation looks for
70-
* sub-classes of Throwable in the method signature.
71-
* <p>The method is static to ensure safe use from sub-class constructors.
70+
* subclasses of Throwable in the method signature.
71+
* <p>The method is static to ensure safe use from subclass constructors.
7272
*/
7373
@SuppressWarnings("unchecked")
7474
protected static List<Class<? extends Throwable>> getExceptionsFromMethodSignature(Method method) {

spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AbstractMethodMessageHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ private String formatMappings(Class<?> userType, Map<Method, T> methods) {
340340
/**
341341
* Provide the mapping for a handler method.
342342
* @param method the method to provide a mapping for
343-
* @param handlerType the handler type, possibly a sub-type of the method's declaring class
343+
* @param handlerType the handler type, possibly a subtype of the method's declaring class
344344
* @return the mapping, or {@code null} if the method is not mapped
345345
*/
346346
@Nullable

spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/InvocableHandlerMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public InvocableHandlerMethod(Object bean, String methodName, Class<?>... parame
7878

7979

8080
/**
81-
* Set {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} to use to use for resolving method argument values.
81+
* Set {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} to use for resolving method argument values.
8282
*/
8383
public void setMessageMethodArgumentResolvers(HandlerMethodArgumentResolverComposite argumentResolvers) {
8484
this.resolvers = argumentResolvers;

spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/reactive/AbstractMethodMessageHandler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public abstract class AbstractMethodMessageHandler<T>
113113
/**
114114
* Configure a predicate for selecting which Spring beans to check for the
115115
* presence of message handler methods.
116-
* <p>This is not set by default. However sub-classes may initialize it to
116+
* <p>This is not set by default. However, subclasses may initialize it to
117117
* some default strategy (e.g. {@code @Controller} classes).
118118
* @see #setHandlers(List)
119119
*/
@@ -235,7 +235,7 @@ public MultiValueMap<String, T> getDestinationLookup() {
235235

236236
/**
237237
* Return the argument resolvers initialized during {@link #afterPropertiesSet()}.
238-
* Primarily for internal use in sub-classes.
238+
* Primarily for internal use in subclasses.
239239
* @since 5.2.2
240240
*/
241241
protected HandlerMethodArgumentResolverComposite getArgumentResolvers() {
@@ -362,7 +362,7 @@ private String formatMappings(Class<?> userType, Map<Method, T> methods) {
362362
/**
363363
* Obtain the mapping for the given method, if any.
364364
* @param method the method to check
365-
* @param handlerType the handler type, possibly a sub-type of the method's declaring class
365+
* @param handlerType the handler type, possibly a subtype of the method's declaring class
366366
* @return the mapping, or {@code null} if the method is not mapped
367367
*/
368368
@Nullable
@@ -418,7 +418,7 @@ private HandlerMethod createHandlerMethod(Object handler, Method method) {
418418

419419
/**
420420
* This method is invoked just before mappings are added. It allows
421-
* sub-classes to update the mapping with the {@link HandlerMethod} in mind.
421+
* subclasses to update the mapping with the {@link HandlerMethod} in mind.
422422
* This can be useful when the method signature is used to refine the
423423
* mapping, e.g. based on the cardinality of input and output.
424424
* <p>By default this method returns the mapping that is passed in.

0 commit comments

Comments
 (0)