parent
ca1e682dc4
commit
c1d44d9a34
|
|
@ -37,8 +37,7 @@ import org.springframework.lang.Nullable;
|
||||||
*/
|
*/
|
||||||
public class MethodOverrides {
|
public class MethodOverrides {
|
||||||
|
|
||||||
private final Set<MethodOverride> overrides =
|
private final Set<MethodOverride> overrides = Collections.synchronizedSet(new LinkedHashSet<>(0));
|
||||||
Collections.synchronizedSet(new LinkedHashSet<MethodOverride>(0));
|
|
||||||
|
|
||||||
private volatile boolean modified = false;
|
private volatile boolean modified = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ import javax.lang.model.element.TypeElement;
|
||||||
*/
|
*/
|
||||||
class MetadataCollector {
|
class MetadataCollector {
|
||||||
|
|
||||||
private final List<ItemMetadata> metadataItems = new ArrayList<ItemMetadata>();
|
private final List<ItemMetadata> metadataItems = new ArrayList<>();
|
||||||
|
|
||||||
private final ProcessingEnvironment processingEnvironment;
|
private final ProcessingEnvironment processingEnvironment;
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ class MetadataCollector {
|
||||||
|
|
||||||
private final TypeHelper typeHelper;
|
private final TypeHelper typeHelper;
|
||||||
|
|
||||||
private final Set<String> processedSourceTypes = new HashSet<String>();
|
private final Set<String> processedSourceTypes = new HashSet<>();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -362,7 +362,7 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
|
||||||
}
|
}
|
||||||
Collections.sort(this.members, Collections.reverseOrder());
|
Collections.sort(this.members, Collections.reverseOrder());
|
||||||
CountDownLatch latch = new CountDownLatch(this.smartMemberCount);
|
CountDownLatch latch = new CountDownLatch(this.smartMemberCount);
|
||||||
Set<String> countDownBeanNames = Collections.synchronizedSet(new LinkedHashSet<String>());
|
Set<String> countDownBeanNames = Collections.synchronizedSet(new LinkedHashSet<>());
|
||||||
for (LifecycleGroupMember member : this.members) {
|
for (LifecycleGroupMember member : this.members) {
|
||||||
if (this.lifecycleBeans.containsKey(member.name)) {
|
if (this.lifecycleBeans.containsKey(member.name)) {
|
||||||
doStop(this.lifecycleBeans, member.name, latch, countDownBeanNames);
|
doStop(this.lifecycleBeans, member.name, latch, countDownBeanNames);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ public class RowMapperResultSetExtractor<T> implements ResultSetExtractor<List<T
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<T> extractData(ResultSet rs) throws SQLException {
|
public List<T> extractData(ResultSet rs) throws SQLException {
|
||||||
List<T> results = (this.rowsExpected > 0 ? new ArrayList<>(this.rowsExpected) : new ArrayList<T>());
|
List<T> results = (this.rowsExpected > 0 ? new ArrayList<>(this.rowsExpected) : new ArrayList<>());
|
||||||
int rowNum = 0;
|
int rowNum = 0;
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
results.add(this.rowMapper.mapRow(rs, rowNum++));
|
results.add(this.rowMapper.mapRow(rs, rowNum++));
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,7 @@ public abstract class AbstractMethodMessageHandler<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void handleMessageInternal(Message<?> message, String lookupDestination) {
|
protected void handleMessageInternal(Message<?> message, String lookupDestination) {
|
||||||
List<Match> matches = new ArrayList<Match>();
|
List<Match> matches = new ArrayList<>();
|
||||||
|
|
||||||
List<T> mappingsByUrl = this.destinationLookup.get(lookupDestination);
|
List<T> mappingsByUrl = this.destinationLookup.get(lookupDestination);
|
||||||
if (mappingsByUrl != null) {
|
if (mappingsByUrl != null) {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ public class BufferingStompDecoder {
|
||||||
|
|
||||||
private final int bufferSizeLimit;
|
private final int bufferSizeLimit;
|
||||||
|
|
||||||
private final Queue<ByteBuffer> chunks = new LinkedBlockingQueue<ByteBuffer>();
|
private final Queue<ByteBuffer> chunks = new LinkedBlockingQueue<>();
|
||||||
|
|
||||||
private volatile Integer expectedContentLength;
|
private volatile Integer expectedContentLength;
|
||||||
|
|
||||||
|
|
@ -107,7 +107,7 @@ public class BufferingStompDecoder {
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteBuffer bufferToDecode = assembleChunksAndReset();
|
ByteBuffer bufferToDecode = assembleChunksAndReset();
|
||||||
MultiValueMap<String, String> headers = new LinkedMultiValueMap<String, String>();
|
MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
|
||||||
List<Message<byte[]>> messages = this.stompDecoder.decode(bufferToDecode, headers);
|
List<Message<byte[]>> messages = this.stompDecoder.decode(bufferToDecode, headers);
|
||||||
|
|
||||||
if (bufferToDecode.hasRemaining()) {
|
if (bufferToDecode.hasRemaining()) {
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class MessageReceivingTemplateTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void receive() {
|
public void receive() {
|
||||||
Message<?> expected = new GenericMessage<Object>("payload");
|
Message<?> expected = new GenericMessage<>("payload");
|
||||||
this.template.setDefaultDestination("home");
|
this.template.setDefaultDestination("home");
|
||||||
this.template.setReceiveMessage(expected);
|
this.template.setReceiveMessage(expected);
|
||||||
Message<?> actual = this.template.receive();
|
Message<?> actual = this.template.receive();
|
||||||
|
|
@ -69,7 +69,7 @@ public class MessageReceivingTemplateTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void receiveFromDestination() {
|
public void receiveFromDestination() {
|
||||||
Message<?> expected = new GenericMessage<Object>("payload");
|
Message<?> expected = new GenericMessage<>("payload");
|
||||||
this.template.setReceiveMessage(expected);
|
this.template.setReceiveMessage(expected);
|
||||||
Message<?> actual = this.template.receive("somewhere");
|
Message<?> actual = this.template.receive("somewhere");
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@ public class MessageReceivingTemplateTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void receiveAndConvert() {
|
public void receiveAndConvert() {
|
||||||
Message<?> expected = new GenericMessage<Object>("payload");
|
Message<?> expected = new GenericMessage<>("payload");
|
||||||
this.template.setDefaultDestination("home");
|
this.template.setDefaultDestination("home");
|
||||||
this.template.setReceiveMessage(expected);
|
this.template.setReceiveMessage(expected);
|
||||||
String payload = this.template.receiveAndConvert(String.class);
|
String payload = this.template.receiveAndConvert(String.class);
|
||||||
|
|
@ -90,7 +90,7 @@ public class MessageReceivingTemplateTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void receiveAndConvertFromDestination() {
|
public void receiveAndConvertFromDestination() {
|
||||||
Message<?> expected = new GenericMessage<Object>("payload");
|
Message<?> expected = new GenericMessage<>("payload");
|
||||||
this.template.setReceiveMessage(expected);
|
this.template.setReceiveMessage(expected);
|
||||||
String payload = this.template.receiveAndConvert("somewhere", String.class);
|
String payload = this.template.receiveAndConvert("somewhere", String.class);
|
||||||
|
|
||||||
|
|
@ -100,7 +100,7 @@ public class MessageReceivingTemplateTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void receiveAndConvertFailed() {
|
public void receiveAndConvertFailed() {
|
||||||
Message<?> expected = new GenericMessage<Object>("not a number test");
|
Message<?> expected = new GenericMessage<>("not a number test");
|
||||||
this.template.setReceiveMessage(expected);
|
this.template.setReceiveMessage(expected);
|
||||||
this.template.setMessageConverter(new GenericMessageConverter());
|
this.template.setMessageConverter(new GenericMessageConverter());
|
||||||
|
|
||||||
|
|
@ -111,7 +111,7 @@ public class MessageReceivingTemplateTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void receiveAndConvertNoConverter() {
|
public void receiveAndConvertNoConverter() {
|
||||||
Message<?> expected = new GenericMessage<Object>("payload");
|
Message<?> expected = new GenericMessage<>("payload");
|
||||||
this.template.setDefaultDestination("home");
|
this.template.setDefaultDestination("home");
|
||||||
this.template.setReceiveMessage(expected);
|
this.template.setReceiveMessage(expected);
|
||||||
this.template.setMessageConverter(new GenericMessageConverter());
|
this.template.setMessageConverter(new GenericMessageConverter());
|
||||||
|
|
|
||||||
|
|
@ -288,7 +288,7 @@ public class MockHttpServletRequestBuilder
|
||||||
*/
|
*/
|
||||||
public MockHttpServletRequestBuilder accept(String... mediaTypes) {
|
public MockHttpServletRequestBuilder accept(String... mediaTypes) {
|
||||||
Assert.notEmpty(mediaTypes, "'mediaTypes' must not be empty");
|
Assert.notEmpty(mediaTypes, "'mediaTypes' must not be empty");
|
||||||
List<MediaType> result = new ArrayList<MediaType>(mediaTypes.length);
|
List<MediaType> result = new ArrayList<>(mediaTypes.length);
|
||||||
for (String mediaType : mediaTypes) {
|
for (String mediaType : mediaTypes) {
|
||||||
result.add(MediaType.parseMediaType(mediaType));
|
result.add(MediaType.parseMediaType(mediaType));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class CompositeFilter implements Filter {
|
||||||
|
|
||||||
|
|
||||||
public void setFilters(List<? extends Filter> filters) {
|
public void setFilters(List<? extends Filter> filters) {
|
||||||
this.filters = new ArrayList<Filter>(filters);
|
this.filters = new ArrayList<>(filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ class DefaultRenderingResponseBuilder implements RenderingResponse.Builder {
|
||||||
|
|
||||||
private final HttpHeaders headers = new HttpHeaders();
|
private final HttpHeaders headers = new HttpHeaders();
|
||||||
|
|
||||||
private final Map<String, Object> model = new LinkedHashMap<String, Object>();
|
private final Map<String, Object> model = new LinkedHashMap<>();
|
||||||
|
|
||||||
|
|
||||||
public DefaultRenderingResponseBuilder(String name) {
|
public DefaultRenderingResponseBuilder(String name) {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public final class HeadersRequestCondition extends AbstractRequestCondition<Head
|
||||||
|
|
||||||
|
|
||||||
private static Collection<HeaderExpression> parseExpressions(String... headers) {
|
private static Collection<HeaderExpression> parseExpressions(String... headers) {
|
||||||
Set<HeaderExpression> expressions = new LinkedHashSet<HeaderExpression>();
|
Set<HeaderExpression> expressions = new LinkedHashSet<>();
|
||||||
if (headers != null) {
|
if (headers != null) {
|
||||||
for (String header : headers) {
|
for (String header : headers) {
|
||||||
HeaderExpression expr = new HeaderExpression(header);
|
HeaderExpression expr = new HeaderExpression(header);
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
|
||||||
protected HandlerMethod lookupHandlerMethod(String lookupPath, ServerWebExchange exchange)
|
protected HandlerMethod lookupHandlerMethod(String lookupPath, ServerWebExchange exchange)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
List<Match> matches = new ArrayList<Match>();
|
List<Match> matches = new ArrayList<>();
|
||||||
List<T> directPathMatches = this.mappingRegistry.getMappingsByUrl(lookupPath);
|
List<T> directPathMatches = this.mappingRegistry.getMappingsByUrl(lookupPath);
|
||||||
if (directPathMatches != null) {
|
if (directPathMatches != null) {
|
||||||
addMatchingMappings(directPathMatches, matches, exchange);
|
addMatchingMappings(directPathMatches, matches, exchange);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import org.springframework.web.servlet.HandlerExceptionResolver;
|
||||||
*/
|
*/
|
||||||
class WebMvcConfigurerComposite implements WebMvcConfigurer {
|
class WebMvcConfigurerComposite implements WebMvcConfigurer {
|
||||||
|
|
||||||
private final List<WebMvcConfigurer> delegates = new ArrayList<WebMvcConfigurer>();
|
private final List<WebMvcConfigurer> delegates = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
public void addWebMvcConfigurers(List<WebMvcConfigurer> configurers) {
|
public void addWebMvcConfigurers(List<WebMvcConfigurer> configurers) {
|
||||||
|
|
|
||||||
|
|
@ -340,7 +340,7 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
protected HandlerMethod lookupHandlerMethod(String lookupPath, HttpServletRequest request) throws Exception {
|
protected HandlerMethod lookupHandlerMethod(String lookupPath, HttpServletRequest request) throws Exception {
|
||||||
List<Match> matches = new ArrayList<Match>();
|
List<Match> matches = new ArrayList<>();
|
||||||
List<T> directPathMatches = this.mappingRegistry.getMappingsByUrl(lookupPath);
|
List<T> directPathMatches = this.mappingRegistry.getMappingsByUrl(lookupPath);
|
||||||
if (directPathMatches != null) {
|
if (directPathMatches != null) {
|
||||||
addMatchingMappings(directPathMatches, matches, request);
|
addMatchingMappings(directPathMatches, matches, request);
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ public class WebSocketExtension {
|
||||||
public static List<WebSocketExtension> parseExtensions(String extensions) {
|
public static List<WebSocketExtension> parseExtensions(String extensions) {
|
||||||
if (StringUtils.hasText(extensions)) {
|
if (StringUtils.hasText(extensions)) {
|
||||||
String[] tokens = StringUtils.tokenizeToStringArray(extensions, ",");
|
String[] tokens = StringUtils.tokenizeToStringArray(extensions, ",");
|
||||||
List<WebSocketExtension> result = new ArrayList<WebSocketExtension>(tokens.length);
|
List<WebSocketExtension> result = new ArrayList<>(tokens.length);
|
||||||
for (String token : tokens) {
|
for (String token : tokens) {
|
||||||
result.add(parseExtension(token));
|
result.add(parseExtension(token));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
|
||||||
|
|
||||||
private MessageHeaderInitializer headerInitializer;
|
private MessageHeaderInitializer headerInitializer;
|
||||||
|
|
||||||
private final Map<String, Principal> stompAuthentications = new ConcurrentHashMap<String, Principal>();
|
private final Map<String, Principal> stompAuthentications = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private Boolean immutableMessageInterceptorPresent;
|
private Boolean immutableMessageInterceptorPresent;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue