Polishing

This commit is contained in:
Juergen Hoeller
2019-03-07 17:55:32 +01:00
parent 458f75f489
commit 18ce8564e2
19 changed files with 126 additions and 110 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 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.
@@ -34,7 +34,8 @@ import org.springframework.validation.ObjectError;
@SuppressWarnings("serial")
public class MethodArgumentNotValidException extends MethodArgumentResolutionException {
private BindingResult bindingResult;
@Nullable
private final BindingResult bindingResult;
/**
@@ -42,6 +43,7 @@ public class MethodArgumentNotValidException extends MethodArgumentResolutionExc
*/
public MethodArgumentNotValidException(Message<?> message, MethodParameter parameter) {
super(message, parameter);
this.bindingResult = null;
}
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@@ -66,18 +66,20 @@ import org.springframework.validation.Validator;
* protocols such as STOMP.
*
* <p>{@link #clientInboundChannel()} and {@link #clientOutboundChannel()} deliver
* messages to and from remote clients to several message handlers such as
* messages to and from remote clients to several message handlers such as the
* following.
* <ul>
* <li>{@link #simpAnnotationMethodMessageHandler()}</li>
* <li>{@link #simpleBrokerMessageHandler()}</li>
* <li>{@link #stompBrokerRelayMessageHandler()}</li>
* <li>{@link #userDestinationMessageHandler()}</li>
* </ul>
* while {@link #brokerChannel()} delivers messages from within the application to the
*
* <p>{@link #brokerChannel()} delivers messages from within the application to the
* the respective message handlers. {@link #brokerMessagingTemplate()} can be injected
* into any application component to send messages.
*
* <p>Subclasses are responsible for the part of the configuration that feed messages
* <p>Subclasses are responsible for the parts of the configuration that feed messages
* to and from the client inbound/outbound channels (e.g. STOMP over WebSocket).
*
* @author Rossen Stoyanchev
@@ -396,7 +398,7 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
* Override this method to add custom message converters.
* @param messageConverters the list to add converters to, initially empty
* @return {@code true} if default message converters should be added to list,
* {@code false} if no more converters should be added.
* {@code false} if no more converters should be added
*/
protected boolean configureMessageConverters(List<MessageConverter> messageConverters) {
return true;
@@ -419,13 +421,13 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
}
/**
* Create the user registry that provides access to the local users.
* Create the user registry that provides access to local users.
*/
protected abstract SimpUserRegistry createLocalUserRegistry();
/**
* Return a {@link org.springframework.validation.Validator}s instance for validating
* {@code @Payload} method arguments.
* Return an {@link org.springframework.validation.Validator} instance for
* validating {@code @Payload} method arguments.
* <p>In order, this method tries to get a Validator instance:
* <ul>
* <li>delegating to getValidator() first</li>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 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.
@@ -267,7 +267,7 @@ public class StompDecoder {
if (index + 1 >= inString.length()) {
throw new StompConversionException("Illegal escape sequence at index " + index + ": " + inString);
}
Character c = inString.charAt(index + 1);
char c = inString.charAt(index + 1);
if (c == 'r') {
sb.append('\r');
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@@ -64,7 +64,7 @@ public class MultiServerUserRegistry implements SimpUserRegistry, SmartApplicati
* Create an instance wrapping the local user registry.
*/
public MultiServerUserRegistry(SimpUserRegistry localRegistry) {
Assert.notNull(localRegistry, "'localRegistry' is required.");
Assert.notNull(localRegistry, "'localRegistry' is required");
this.id = generateId();
this.localRegistry = localRegistry;
this.delegateApplicationEvents = this.localRegistry instanceof SmartApplicationListener;