language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/core/MessageReceivingOperations.java
@@ -20,7 +20,12 @@ /** + * A set of operations receiving messages from a destination. + * + * @param <D> the type of destination from which messages can be received + * * @author Mark Fisher + * @author Rossen Stoyanchev * @since 4.0 */ public interface MessageReceivingOperations<D> { @@ -29,8 +34,10 @@ ...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/core/MessageRequestReplyOperations.java
@@ -15,25 +15,41 @@ */ package org.springframework.messaging.core; +import java.util.Map; + import org.springframework.messaging.Message; +import org.springframework.messaging.MessagingException; /** + * A set of operations for exchanging messages to and from a destination. + * + * @param <D> the type of des...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/core/MessageSendingOperations.java
@@ -15,26 +15,39 @@ */ package org.springframework.messaging.core; +import java.util.Map; + import org.springframework.messaging.Message; import org.springframework.messaging.MessagingException; /** + * A set of operations sending messages to a destination. + * + * @param <D> the type of destination to whic...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageBodyMethodArgumentResolver.java
@@ -35,10 +35,10 @@ */ public class MessageBodyMethodArgumentResolver implements HandlerMethodArgumentResolver { - private final MessageConverter<?> converter; + private final MessageConverter converter; - public MessageBodyMethodArgumentResolver(MessageConverter<?> converter) { + public MessageBodyMethodArgum...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageHeaderAccessor.java
@@ -20,9 +20,7 @@ import java.util.List; import java.util.Map; -import org.springframework.http.MediaType; import org.springframework.messaging.Message; -import org.springframework.messaging.MessageHeaders; import org.springframework.messaging.support.NativeMessageHeaderAccessor; import org.springframework.util....
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageSendingOperations.java
@@ -16,6 +16,8 @@ package org.springframework.messaging.simp; +import java.util.Map; + import org.springframework.messaging.MessagingException; import org.springframework.messaging.core.MessagePostProcessor; import org.springframework.messaging.core.MessageSendingOperations; @@ -35,19 +37,25 @@ public interface...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessagingTemplate.java
@@ -15,6 +15,8 @@ */ package org.springframework.messaging.simp; +import java.util.Map; + import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageDeliveryException; @@ -90,7 +92,7 @@ public long getSendTimeout() { @Over...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/simp/config/WebSocketMessageBrokerConfigurationSupport.java
@@ -16,6 +16,9 @@ package org.springframework.messaging.simp.config; +import java.util.ArrayList; +import java.util.List; + import org.springframework.context.annotation.Bean; import org.springframework.messaging.Message; import org.springframework.messaging.SubscribableChannel; @@ -28,11 +31,18 @@ import org....
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AnnotationMethodMessageHandler.java
@@ -83,7 +83,7 @@ public class AnnotationMethodMessageHandler implements MessageHandler, Applicati private Collection<String> destinationPrefixes = new ArrayList<String>(); - private MessageConverter<?> messageConverter; + private MessageConverter messageConverter; private ApplicationContext applicationContex...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaderAccessor.java
@@ -23,12 +23,13 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicLong; -import org.springframework.http.MediaType; import org.springframework.messaging.Message; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; impor...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/support/MessageHeaderAccessor.java
@@ -29,6 +29,7 @@ import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageHeaders; import org.springframework.util.Assert; +import org.springframework.util.MimeType; import org.springframework.util.ObjectUtils; import org.springframework.util.PatternMatchUtils; import org....
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/support/converter/AbstractMessageConverter.java
@@ -0,0 +1,206 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + ...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/support/converter/ByteArrayMessageConverter.java
@@ -0,0 +1,54 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/support/converter/CompositeMessageConverter.java
@@ -0,0 +1,110 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * +...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/support/converter/ContentTypeResolver.java
@@ -5,36 +5,29 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distri...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/support/converter/DefaultContentTypeResolver.java
@@ -0,0 +1,60 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/support/converter/MappingJackson2MessageConverter.java
@@ -20,97 +20,144 @@ import java.io.IOException; import java.io.StringWriter; import java.io.Writer; -import java.lang.reflect.Type; -import java.util.Map; +import java.nio.charset.Charset; import org.springframework.messaging.Message; -import org.springframework.messaging.support.MessageBuilder; -import org.spri...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/support/converter/MessageConverter.java
@@ -16,19 +16,53 @@ package org.springframework.messaging.support.converter; -import java.lang.reflect.Type; - import org.springframework.messaging.Message; +import org.springframework.messaging.MessageHeaders; /** + * A converter to turn the payload of a {@link Message} from serialized form to a typed + * O...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/main/java/org/springframework/messaging/support/converter/StringMessageConverter.java
@@ -0,0 +1,78 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SendToMethodReturnValueHandlerTests.java
@@ -76,11 +76,11 @@ public void setup() throws Exception { MockitoAnnotations.initMocks(this); - Message<String> message = MessageBuilder.withPayload(payloadContent).build(); - when(this.messageConverter.toMessage(payloadContent)).thenReturn(message); + Message message = MessageBuilder.withPayload(payloadCont...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandlerTests.java
@@ -72,11 +72,11 @@ public void setup() throws Exception { MockitoAnnotations.initMocks(this); - Message<String> message = MessageBuilder.withPayload(payloadContent).build(); - when(this.messageConverter.toMessage(payloadContent)).thenReturn(message); + Message message = MessageBuilder.withPayload(payloadCont...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/test/java/org/springframework/messaging/simp/config/WebSocketMessageBrokerConfigurationSupportTests.java
@@ -43,7 +43,10 @@ import org.springframework.messaging.simp.stomp.StompHeaderAccessor; import org.springframework.messaging.simp.stomp.StompTextMessageBuilder; import org.springframework.messaging.support.MessageBuilder; +import org.springframework.messaging.support.converter.CompositeMessageConverter; +import org....
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompHeaderAccessorTests.java
@@ -21,8 +21,12 @@ import org.junit.Test; import org.springframework.http.MediaType; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageHeaders; import org.springframework.messaging.simp.SimpMessageType; +import org.springframework.messaging.support.MessageBuilder; import ...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/test/java/org/springframework/messaging/support/converter/AbstractMessageConverterTests.java
@@ -0,0 +1,136 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + ...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/test/java/org/springframework/messaging/support/converter/DefaultContentTypeResolverTests.java
@@ -0,0 +1,70 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/test/java/org/springframework/messaging/support/converter/MappingJackson2MessageConverterTests.java
@@ -0,0 +1,215 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + ...
true
Other
spring-projects
spring-framework
7d3b6497b5e95eaa212cf2dd985d6a7e686e2940.json
Add support for MIME-based message conversion The MessageConverter interface in spring-messaging is now explicitly designed to support conversion of the payload of a Message<?> to and from serialized form based on MIME type message header. By default, the MessageHeaders.CONTENT_HEADER header is used but a custom Conte...
spring-messaging/src/test/java/org/springframework/messaging/support/converter/StringMessageConverterTests.java
@@ -0,0 +1,113 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + ...
true
Other
spring-projects
spring-framework
ee8f1aa61a4c9aad2ea09ce24aa4f247b3c17dfc.json
Clarify ResolvableType.resolve() Java Doc Issue: SPR-10973
spring-core/src/main/java/org/springframework/core/ResolvableType.java
@@ -456,7 +456,8 @@ public Class<?> resolveGeneric(int... indexes) { /** * Resolve this type to a {@link java.lang.Class}, returning {@code null} if the type * cannot be resolved. This method will consider bounds of {@link TypeVariable}s and - * {@link WildcardType}s if direct resolution fails. + * {@link Wil...
false
Other
spring-projects
spring-framework
5358cc0f5f412b541bdb7e8b89374d924eb12fa4.json
Fix ResolvableType isAssignableFrom for <?> Fix ResolvableType.isAssignableFrom to correctly deal with <?> style generics. Issue: SPR-10973
spring-core/src/main/java/org/springframework/core/ResolvableType.java
@@ -138,7 +138,7 @@ private boolean isAssignableFrom(ResolvableType type, boolean checkingGeneric) { Assert.notNull(type, "Type must not be null"); // If we cannot resolve types, we are not assignable - if (resolve() == null || type.resolve() == null) { + if (this == NONE || type == NONE) { return false; ...
true
Other
spring-projects
spring-framework
5358cc0f5f412b541bdb7e8b89374d924eb12fa4.json
Fix ResolvableType isAssignableFrom for <?> Fix ResolvableType.isAssignableFrom to correctly deal with <?> style generics. Issue: SPR-10973
spring-core/src/test/java/org/springframework/core/ResolvableTypeTests.java
@@ -52,8 +52,6 @@ import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; -// FIXME nested - /** * Tests for {@link ResolvableType}. * @@ -822,8 +820,8 @@ public void isAssignableFromCannotBeResolved() throws Exception { ResolvableType objectType = ResolvableType.forClass(Object.class); ...
true
Other
spring-projects
spring-framework
fdf0ef40c0735e2b5b48330e29f4d8914c838e3b.json
Use ResolvableType in GenericCollectnTypeResolver Refactor GenericCollectionTypeResolver to make use of ResolvableType for generic resolution. Issue: SPR-10977
spring-core/src/main/java/org/springframework/core/GenericCollectionTypeResolver.java
@@ -16,15 +16,8 @@ package org.springframework.core; -import java.lang.reflect.Array; import java.lang.reflect.Field; -import java.lang.reflect.GenericArrayType; -import java.lang.reflect.MalformedParameterizedTypeException; import java.lang.reflect.Method; -import java.lang.reflect.ParameterizedType; -import ja...
false
Other
spring-projects
spring-framework
595efe9aab884bab233c61278f00ef325446d268.json
Use ResolvableType in GenericTypeResolver Refactor GenericTypeResolver to make use of ResolvableType for generic resolution. Issue: SPR-10978
spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java
@@ -16,14 +16,12 @@ package org.springframework.core; -import java.lang.reflect.Array; -import java.lang.reflect.GenericArrayType; -import java.lang.reflect.MalformedParameterizedTypeException; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import ja...
true
Other
spring-projects
spring-framework
595efe9aab884bab233c61278f00ef325446d268.json
Use ResolvableType in GenericTypeResolver Refactor GenericTypeResolver to make use of ResolvableType for generic resolution. Issue: SPR-10978
spring-core/src/main/java/org/springframework/core/MethodParameter.java
@@ -63,7 +63,7 @@ public class MethodParameter { /** Map from Integer level to Integer type index */ Map<Integer, Integer> typeIndexesPerLevel; - Map<TypeVariable, Type> typeVariableMap; + Class<?> resolveClass; private int hash = 0; @@ -137,7 +137,7 @@ public MethodParameter(MethodParameter original) { ...
true
Other
spring-projects
spring-framework
595efe9aab884bab233c61278f00ef325446d268.json
Use ResolvableType in GenericTypeResolver Refactor GenericTypeResolver to make use of ResolvableType for generic resolution. Issue: SPR-10978
spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java
@@ -25,6 +25,7 @@ import org.junit.Test; +import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import static org.springframework.core.GenericTypeResolver.*; import static org.springframework.util.ReflectionUtils.*; @@ -158,6 +159,43 @@ public void testBoundParameterizedType() { assertEqua...
true
Other
spring-projects
spring-framework
6a18b0048ddbe9e65f6270946c1c17c6fdc66539.json
Introduce ResolvableType Class Add a new ResolvableType Class which encapsulates java.lang.reflect.Type, providing access to supertypes, interfaces and generic parameters along with the ability to ultimately resolve to a java.lang.Class. ResolvableTypes may be obtained from fields, method parameters, method returns, ...
spring-core/src/main/java/org/springframework/core/ResolvableType.java
@@ -0,0 +1,914 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 +...
true
Other
spring-projects
spring-framework
6a18b0048ddbe9e65f6270946c1c17c6fdc66539.json
Introduce ResolvableType Class Add a new ResolvableType Class which encapsulates java.lang.reflect.Type, providing access to supertypes, interfaces and generic parameters along with the ability to ultimately resolve to a java.lang.Class. ResolvableTypes may be obtained from fields, method parameters, method returns, ...
spring-core/src/main/java/org/springframework/core/TypeVariableResolver.java
@@ -0,0 +1,38 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *...
true
Other
spring-projects
spring-framework
6a18b0048ddbe9e65f6270946c1c17c6fdc66539.json
Introduce ResolvableType Class Add a new ResolvableType Class which encapsulates java.lang.reflect.Type, providing access to supertypes, interfaces and generic parameters along with the ability to ultimately resolve to a java.lang.Class. ResolvableTypes may be obtained from fields, method parameters, method returns, ...
spring-core/src/test/java/org/springframework/core/ResolvableTypeTests.java
@@ -0,0 +1,1285 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 ...
true
Other
spring-projects
spring-framework
4bf5a0234c6c5c5d6591eb0fa52db3bf09573d9f.json
Add doesNotExist match to HeaderResultMatchers Prior to this commit, one could not test for the absence of a specific HTTP header in a response. Using header("X-Custom-Header", Matchers.nullValue()) would not work because it tests for an empty value of an existing header. This commit adds a doesNotExist method on the...
spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/HeaderResultMatchers.java
@@ -16,14 +16,13 @@ package org.springframework.test.web.servlet.result; -import static org.springframework.test.util.AssertionErrors.assertEquals; -import static org.springframework.test.util.AssertionErrors.assertTrue; -import static org.springframework.test.util.MatcherAssertionErrors.assertThat; - import org....
true
Other
spring-projects
spring-framework
4bf5a0234c6c5c5d6591eb0fa52db3bf09573d9f.json
Add doesNotExist match to HeaderResultMatchers Prior to this commit, one could not test for the absence of a specific HTTP header in a response. Using header("X-Custom-Header", Matchers.nullValue()) would not work because it tests for an empty value of an existing header. This commit adds a doesNotExist method on the...
spring-test-mvc/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/HeaderAssertionTests.java
@@ -35,7 +35,7 @@ /** * Examples of expectations on response header values. - * + * * @author Rossen Stoyanchev * @author Sam Brannen */ @@ -110,6 +110,22 @@ public void longValueWithMissingResponseHeader() throws Exception { } } + // SPR-10771 + + @Test + public void doesNotExist() throws Exception ...
true
Other
spring-projects
spring-framework
c01f45fa59db126e928affccad596eca45c8c202.json
Fix failing test
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java
@@ -17,6 +17,7 @@ package org.springframework.web.servlet.config.annotation; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -321,8 +322,11 @@ public HandlerMapping resourceHandlerMapping() { */ @Bean public ResourceUrlGe...
true
Other
spring-projects
spring-framework
c01f45fa59db126e928affccad596eca45c8c202.json
Fix failing test
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlFilterTests.java
@@ -17,7 +17,6 @@ package org.springframework.web.servlet.resource; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import javax.servlet.ServletException; @@ -26,7 +25,6 @@ import javax.servlet.http.HttpServletResponse; import org.junit.Test; -import org.springframework.con...
true
Other
spring-projects
spring-framework
e60e8dc582b96f166bc2e81b8319674227b724cf.json
Fix issue with getting SockJS path Issue: SPR-10923
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
@@ -374,7 +374,7 @@ private String getSockJsPath(ServerHttpRequest request) { // Try SockJS prefix hints if (!this.validSockJsPrefixes.isEmpty()) { for (String prefix : this.validSockJsPrefixes) { - int index = path.indexOf(prefix); + int index = path.lastIndexOf(prefix); if (index != -1) { t...
true
Other
spring-projects
spring-framework
e60e8dc582b96f166bc2e81b8319674227b724cf.json
Fix issue with getting SockJS path Issue: SPR-10923
spring-websocket/src/test/java/org/springframework/web/socket/sockjs/support/AbstractSockJsServiceTests.java
@@ -113,6 +113,17 @@ public void getSockJsPathForTransportRequestWithConfiguredPrefix() throws Except assertSame(this.handler, this.service.handler); } + // SPR-10923 + + @Test + public void getSockJsPathWithPartlyMatchingServletPath() throws Exception { + + this.service.setValidSockJsPrefixes("/snake"); + han...
true
Other
spring-projects
spring-framework
b2f31a3c741ddfaad94ffe5da7de762f8e3cc6cb.json
Improve handling of send failures Prior to this commit, a failure to send a heartbeat was ignored and a failure to forward a message to the broker would result in an error frame being sent but nothing more. Following this commit, a failure to send a heartbeat to the broker is treated as a TCP client failure. Furtherm...
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
@@ -24,6 +24,7 @@ import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.MessageDeliveryException; import org.springframework.messaging.MessageHandler; import org.springframework.messaging.simp.SimpMessageType; import org.springfra...
true
Other
spring-projects
spring-framework
b2f31a3c741ddfaad94ffe5da7de762f8e3cc6cb.json
Improve handling of send failures Prior to this commit, a failure to send a heartbeat was ignored and a failure to forward a message to the broker would result in an error frame being sent but nothing more. Following this commit, a failure to send a heartbeat to the broker is treated as a TCP client failure. Furtherm...
spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerIntegrationTests.java
@@ -33,6 +33,7 @@ import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.messaging.Message; +import org.springframework.messaging.MessageDeliveryException; import org.springframework.messaging.MessageHandler; import org.springfr...
true
Other
spring-projects
spring-framework
1ba806b1857e33a13d90f4a6d12eb27e01da4f3b.json
Remove unintended changes from last commit
build.gradle
@@ -22,7 +22,6 @@ configure(allprojects) { project -> apply plugin: "java" apply plugin: "test-source-set-dependencies" apply from: "${gradleScriptDir}/ide.gradle" - apply plugin: "maven" [compileJava, compileTestJava]*.options*.compilerArgs = [ "-Xlint:serial", @@ -632,7 +631,6 @@ project("spring-webmvc")...
true
Other
spring-projects
spring-framework
1ba806b1857e33a13d90f4a6d12eb27e01da4f3b.json
Remove unintended changes from last commit
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/LessResourceTransformer.java
@@ -1,68 +0,0 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - *...
true
Other
spring-projects
spring-framework
1ba806b1857e33a13d90f4a6d12eb27e01da4f3b.json
Remove unintended changes from last commit
spring-webmvc/src/test/resources/log4j.xml
@@ -19,10 +19,6 @@ <level value="debug" /> </logger> - <logger name="org.springframework.web.servlet.resource"> - <level value="trace" /> - </logger> - <!-- Root Logger --> <root> <priority value="warn" />
true
Other
spring-projects
spring-framework
8abe949734414e91e204d14e381be7f922f2dfc3.json
Fix ArrayStoreException reading subclassed enums Fix ASM AnnotationAttributesReadingVisitor to correctly deal with subclasses enums. Issue: SPR-10914
spring-core/src/main/java/org/springframework/core/type/classreading/AnnotationAttributesReadingVisitor.java
@@ -28,7 +28,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - import org.springframework.asm.AnnotationVisitor; import org.springframework.asm.SpringAsmInfo; import org.springframework.asm.Type; @@ -131,7 +130,13 @@ public void visit(String attributeName, Object attribu...
true
Other
spring-projects
spring-framework
8abe949734414e91e204d14e381be7f922f2dfc3.json
Fix ArrayStoreException reading subclassed enums Fix ASM AnnotationAttributesReadingVisitor to correctly deal with subclasses enums. Issue: SPR-10914
spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java
@@ -98,7 +98,7 @@ private void doTestAnnotationInfo(AnnotationMetadata metadata) { assertThat(metadata.hasAnnotation(Component.class.getName()), is(true)); assertThat(metadata.hasAnnotation(Scope.class.getName()), is(true)); assertThat(metadata.hasAnnotation(SpecialAttr.class.getName()), is(true)); - assertTh...
true
Other
spring-projects
spring-framework
6ca8346ebdd8f9cd1aef01a85c0e729aff6a2c0b.json
Remove unused snapshot repository definition
build.gradle
@@ -70,8 +70,7 @@ configure(allprojects) { project -> maven { url "http://repo.spring.io/milestone" } // for AspectJ 1.8.0.M1 maven { url "https://repository.apache.org/content/repositories/releases" } // tomcat 8 RC3 maven { url "https://repository.apache.org/content/repositories/snapshots" } // tomcat-webso...
false
Other
spring-projects
spring-framework
6679feb77b49ef3f779f1dcfb40b5ee25c5d9f76.json
Improve handling of missed heartbeats Previously, when a broker heartbeat was mnissed, the STOMP connection would be left in a semi-disconnected state such that, for example, the read and write idle callbacks would still be active, even though the underlying TCP connection had been nulled out. As part of disconnectin...
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
@@ -438,7 +438,12 @@ public boolean isReady() { public void setDisconnected() { this.readyConnection.set(null); - this.connection = null; + + TcpConnection<Message<byte[]>, Message<byte[]>> localConnection = this.connection; + if (localConnection != null) { + localConnection.close(); + this.connect...
false
Other
spring-projects
spring-framework
39ff1e2c5375868a92318251f3015114e8b49d0d.json
Add StompProtocolHandler tests
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompProtocolHandler.java
@@ -30,6 +30,7 @@ import org.springframework.messaging.handler.websocket.SubProtocolHandler; import org.springframework.messaging.simp.SimpMessageType; import org.springframework.messaging.simp.handler.MutableUserQueueSuffixResolver; +import org.springframework.messaging.simp.handler.SimpleUserQueueSuffixResolver; ...
true
Other
spring-projects
spring-framework
39ff1e2c5375868a92318251f3015114e8b49d0d.json
Add StompProtocolHandler tests
spring-messaging/src/test/java/org/springframework/messaging/simp/config/WebSocketMessageBrokerConfigurationTests.java
@@ -27,15 +27,12 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.messaging.Message; import org.springframework.messaging.SubscribableChannel; import org.spr...
true
Other
spring-projects
spring-framework
39ff1e2c5375868a92318251f3015114e8b49d0d.json
Add StompProtocolHandler tests
spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompMessageConverterTests.java
@@ -24,6 +24,7 @@ import org.springframework.messaging.MessageHeaders; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; +import org.springframework.web.socket.TextMessage; import static org.junit.Assert.*; @@ -41,14 +42,17 @@ public ...
true
Other
spring-projects
spring-framework
39ff1e2c5375868a92318251f3015114e8b49d0d.json
Add StompProtocolHandler tests
spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompProtocolHandlerTests.java
@@ -0,0 +1,97 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *...
true
Other
spring-projects
spring-framework
39ff1e2c5375868a92318251f3015114e8b49d0d.json
Add StompProtocolHandler tests
spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompTextMessageBuilder.java
@@ -0,0 +1,71 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *...
true
Other
spring-projects
spring-framework
39ff1e2c5375868a92318251f3015114e8b49d0d.json
Add StompProtocolHandler tests
spring-websocket/src/test/java/org/springframework/web/socket/server/config/WebSocketConfigurationTests.java
@@ -17,26 +17,26 @@ package org.springframework.web.socket.server.config; import java.util.Arrays; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parame...
true
Other
spring-projects
spring-framework
39ff1e2c5375868a92318251f3015114e8b49d0d.json
Add StompProtocolHandler tests
spring-websocket/src/test/java/org/springframework/web/socket/support/TestPrincipal.java
@@ -0,0 +1,56 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *...
true
Other
spring-projects
spring-framework
364bc357095e34504b10bc138b8c59da578dd14f.json
Use correct header for version in CONNECTED frame Previously, the negotiated version was included in the CONNECTED frame using the accept-version header. This is incorrect. The version header should be used.
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompProtocolHandler.java
@@ -185,10 +185,10 @@ protected void handleConnect(WebSocketSession session, Message<?> message) throw Set<String> acceptVersions = connectHeaders.getAcceptVersion(); if (acceptVersions.contains("1.2")) { - connectedHeaders.setAcceptVersion("1.2"); + connectedHeaders.setVersion("1.2"); } else if (acce...
false
Other
spring-projects
spring-framework
80812d30d4283c11ad74befa5879e4412e4e34be.json
Protect STOMP passcode from showing up in logs Issue: SRP-10868
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaderAccessor.java
@@ -44,6 +44,8 @@ */ public class StompHeaderAccessor extends SimpMessageHeaderAccessor { + private static final AtomicLong messageIdCounter = new AtomicLong(); + // STOMP header names public static final String STOMP_ID_HEADER = "id"; @@ -83,10 +85,9 @@ public class StompHeaderAccessor extends SimpMessageHe...
true
Other
spring-projects
spring-framework
80812d30d4283c11ad74befa5879e4412e4e34be.json
Protect STOMP passcode from showing up in logs Issue: SRP-10868
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompMessageConverter.java
@@ -141,7 +141,7 @@ public byte[] fromMessage(Message<?> message) { try { out.write(stompHeaders.getCommand().toString().getBytes("UTF-8")); out.write(LF); - for (Entry<String, List<String>> entry : stompHeaders.toNativeHeaderMap().entrySet()) { + for (Entry<String, List<String>> entry : stompHeaders.toS...
true
Other
spring-projects
spring-framework
80812d30d4283c11ad74befa5879e4412e4e34be.json
Protect STOMP passcode from showing up in logs Issue: SRP-10868
spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompHeaderAccessorTests.java
@@ -90,6 +90,26 @@ public void createWithMessageFrameNativeHeaders() { assertEquals("s1", headers.getSubscriptionId()); } + @Test + public void createWithConnectNativeHeaders() { + + MultiValueMap<String, String> extHeaders = new LinkedMultiValueMap<>(); + extHeaders.add(StompHeaderAccessor.STOMP_LOGIN_HEADER,...
true
Other
spring-projects
spring-framework
80812d30d4283c11ad74befa5879e4412e4e34be.json
Protect STOMP passcode from showing up in logs Issue: SRP-10868
spring-websocket/src/main/java/org/springframework/web/socket/TextMessage.java
@@ -49,7 +49,7 @@ protected int getPayloadSize() { @Override protected String toStringPayload() { - return (getPayloadSize() > 80) ? getPayload().substring(0, 80) + "..." : getPayload(); + return (getPayloadSize() > 10) ? getPayload().substring(0, 10) + ".." : getPayload(); } }
true
Other
spring-projects
spring-framework
57f7b14b4939a244973725768ef4d819c7adcea4.json
Assign lowest priority to `/**` pattern Update AntPathMatcher Comparator to treat `/**` in the same way as `null` paths. Prior to this commit the pattern `/**` would be picked in preference to patterns with 3 or more PathVariable (e.g. `/matches/{matchId}/ periods/{periodId}/teams/{teamId}/results`). Issue: SPR-1055...
spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
@@ -391,15 +391,16 @@ private AntPatternComparator(String path) { @Override public int compare(String pattern1, String pattern2) { - if (pattern1 == null && pattern2 == null) { + if (isNullOrCaptureAllPattern(pattern1) && isNullOrCaptureAllPattern(pattern2)) { return 0; } - else if (pattern1 == n...
true
Other
spring-projects
spring-framework
57f7b14b4939a244973725768ef4d819c7adcea4.json
Assign lowest priority to `/**` pattern Update AntPathMatcher Comparator to treat `/**` in the same way as `null` paths. Prior to this commit the pattern `/**` would be picked in preference to patterns with 3 or more PathVariable (e.g. `/matches/{matchId}/ periods/{periodId}/teams/{teamId}/results`). Issue: SPR-1055...
spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java
@@ -437,6 +437,11 @@ public void patternComparator() { assertEquals(-1, comparator.compare("/hotels/{hotel}/booking", "/hotels/{hotel}/bookings/{booking}")); assertEquals(1, comparator.compare("/hotels/{hotel}/bookings/{booking}", "/hotels/{hotel}/booking")); + //SPR-10550 + assertEquals(-1, comparator.compar...
true
Other
spring-projects
spring-framework
c1dafed886f9f136b788f1a23528d5173167a3e8.json
Refine AntPathMatcher.combine when p1 contains '.' Refine AntPathMatcher.combine rules to allow direct concatenation of patterns when pattern1 does not contain '*.'. Prior to this commit direct concatenation was allowed when pattern1 did not contain '.', this prevented calls of the form: pathMatcher.combine("/1.0", ...
spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
@@ -317,10 +317,10 @@ public String combine(String pattern1, String pattern2) { if (!StringUtils.hasText(pattern1) && !StringUtils.hasText(pattern2)) { return ""; } - else if (!StringUtils.hasText(pattern1)) { + if (!StringUtils.hasText(pattern1)) { return pattern2; } - else if (!StringUtils.hasText...
true
Other
spring-projects
spring-framework
c1dafed886f9f136b788f1a23528d5173167a3e8.json
Refine AntPathMatcher.combine when p1 contains '.' Refine AntPathMatcher.combine rules to allow direct concatenation of patterns when pattern1 does not contain '*.'. Prior to this commit direct concatenation was allowed when pattern1 did not contain '.', this prevented calls of the form: pathMatcher.combine("/1.0", ...
spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java
@@ -399,6 +399,7 @@ public void combine() { assertEquals("/hotels/**/booking", pathMatcher.combine("/hotels/**", "/booking")); assertEquals("/hotels/booking", pathMatcher.combine("/hotels", "/booking")); assertEquals("/hotels/booking", pathMatcher.combine("/hotels", "booking")); + assertEquals("/hotels/bookin...
true
Other
spring-projects
spring-framework
00c744ba1a94f27a6a43681f346a3423a68ab6d7.json
Fix malformed code in documentation Fixed code snippets in "Handling complex types for stored procedure calls" paragraph. Issue: SPR-10798
src/reference/docbook/jdbc.xml
@@ -2601,19 +2601,19 @@ clobReader.close();]]></programlisting> that must be implemented. This interface is used as part of the declaration of an <classname>SqlOutParameter</classname>.</para> - <para><programlisting language="java">final TestItem - new TestItem(123L, "A test item", - new Si...
false
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageHeaderAccessor.java
@@ -68,7 +68,6 @@ protected SimpMessageHeaderAccessor(SimpMessageType messageType, Map<String, Lis */ protected SimpMessageHeaderAccessor(Message<?> message) { super(message); - Assert.notNull(message, "message is required"); }
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/main/java/org/springframework/messaging/support/NativeMessageHeaderAccessor.java
@@ -107,7 +107,10 @@ public Map<String, List<String>> toNativeHeaderMap() { return result; } - protected List<String> getNativeHeader(String headerName) { + /** + * Return all values for the specified native header or {@code null}. + */ + public List<String> getNativeHeader(String headerName) { if (this.nat...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/main/java/org/springframework/messaging/support/channel/AbstractMessageChannel.java
@@ -0,0 +1,130 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + ...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/main/java/org/springframework/messaging/support/channel/AbstractSubscribableChannel.java
@@ -16,14 +16,8 @@ package org.springframework.messaging.support.channel; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.beans.factory.BeanNameAware; -import org.springframework.messaging.Message; import org.springframework.messaging.MessageHandl...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/main/java/org/springframework/messaging/support/channel/ChannelInterceptor.java
@@ -0,0 +1,60 @@ +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + ...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/main/java/org/springframework/messaging/support/channel/ChannelInterceptorAdapter.java
@@ -0,0 +1,46 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + ...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/main/java/org/springframework/messaging/support/channel/ChannelInterceptorChain.java
@@ -0,0 +1,110 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + ...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompHeaderAccessorTests.java
@@ -16,8 +16,14 @@ package org.springframework.messaging.simp.stomp; +import java.util.List; +import java.util.Map; + import org.junit.Test; +import org.springframework.http.MediaType; +import org.springframework.messaging.simp.SimpMessageType; import org.springframework.util.LinkedMultiValueMap; +import org.spr...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java
@@ -0,0 +1,78 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + *...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/test/java/org/springframework/messaging/support/NativeMessageHeaderAccessorTests.java
@@ -0,0 +1,127 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + ...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/test/java/org/springframework/messaging/support/channel/ChannelInterceptorTests.java
@@ -0,0 +1,156 @@ +/* + * Copyright 2002-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + ...
true
Other
spring-projects
spring-framework
4b2847d9d12bad150e3a2e0730a331e07825b06c.json
Add ChannelInterceptor to spring-messaging module Issue: SPR-10866
spring-messaging/src/test/java/org/springframework/messaging/support/channel/PublishSubscibeChannelTests.java
@@ -26,6 +26,7 @@ import org.mockito.MockitoAnnotations; import org.springframework.core.task.TaskExecutor; import org.springframework.messaging.Message; +import org.springframework.messaging.MessageDeliveryException; import org.springframework.messaging.MessageHandler; import org.springframework.messaging.Messagi...
true
Other
spring-projects
spring-framework
00bc54dcc5a8db6ccad60b5ce5f9e9ed93cfde1d.json
Restore method signatures on MediaType Previously the method signatures for includes and isCompatibleWith were incompatible with Spring 3.2.x since the argument was now MimeType. This caused NoSuchMethodError to be thrown when a class was compiled against MediaType from Spring 3.2.x and ran against MediaType from Spri...
spring-web/src/main/java/org/springframework/http/MediaType.java
@@ -295,6 +295,28 @@ public double getQualityValue() { return (qualityFactory != null ? Double.parseDouble(unquote(qualityFactory)) : 1D); } + /** + * Indicate whether this {@code MediaType} includes the given media type. + * <p>For instance, {@code text/*} includes {@code text/plain} and {@code text/html}, an...
false
Other
spring-projects
spring-framework
750930fa25dde35fcab82f9a210e42ce02d65d7d.json
Fix bug with the order of messaging arg resolvers
spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AnnotationMethodMessageHandler.java
@@ -173,16 +173,16 @@ public void afterPropertiesSet() { initHandlerMethods(); - // Annotation-based argument resolution - this.argumentResolvers.addResolver(new MessageBodyMethodArgumentResolver(this.messageConverter)); - // Type-based argument resolution this.argumentResolvers.addResolver(new Principal...
false
Other
spring-projects
spring-framework
3f130a1c086028aef7ce1debdcd18642801525b2.json
Add support for custom types in AMMH
spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AnnotationMethodMessageHandler.java
@@ -18,6 +18,7 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Method; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -44,7 +45,9 @@ import org.springframework.messaging.handler.annotation.support.MessageBodyMethodArgumentResolver; ...
false
Other
spring-projects
spring-framework
c48a41ea7a16e90eec520b6a3f311427e0e9ed18.json
Fix minor issue in JettyRequestUpgradeStrategy Issue: SPR-10861
spring-websocket/src/main/java/org/springframework/web/socket/server/support/JettyRequestUpgradeStrategy.java
@@ -69,6 +69,8 @@ public JettyRequestUpgradeStrategy() { * {@link WebSocketServerFactory#getPolicy()}. */ public JettyRequestUpgradeStrategy(WebSocketServerFactory factory) { + Assert.notNull(factory, "WebSocketServerFactory is required"); + this.factory = factory; this.factory.setCreator(new WebSocketCrea...
false
Other
spring-projects
spring-framework
ed9b2966c079b73094f293e5d0c35abd9d59db09.json
Revise use of FilterChain in MockMvc MockFilterChain should not be re-used across requests. This is not an issue unless tests are executed concurrently. This change ensures the MockFilterChain is re-created for each request in MockMvc. Issue: SPR-10838
spring-test-mvc/src/main/java/org/springframework/test/web/servlet/MockMvc.java
@@ -19,6 +19,7 @@ import java.util.ArrayList; import java.util.List; +import javax.servlet.Filter; import javax.servlet.ServletContext; import org.springframework.beans.Mergeable; @@ -54,7 +55,9 @@ public final class MockMvc { static String MVC_RESULT_ATTRIBUTE = MockMvc.class.getName().concat(".MVC_RESULT_...
true
Other
spring-projects
spring-framework
ed9b2966c079b73094f293e5d0c35abd9d59db09.json
Revise use of FilterChain in MockMvc MockFilterChain should not be re-used across requests. This is not an issue unless tests are executed concurrently. This change ensures the MockFilterChain is re-created for each request in MockMvc. Issue: SPR-10838
spring-test-mvc/src/main/java/org/springframework/test/web/servlet/MockMvcBuilderSupport.java
@@ -23,7 +23,6 @@ import javax.servlet.ServletException; import org.springframework.core.NestedRuntimeException; -import org.springframework.mock.web.MockFilterChain; import org.springframework.mock.web.MockServletConfig; import org.springframework.web.context.WebApplicationContext; @@ -57,9 +56,7 @@ protected ...
true
Other
spring-projects
spring-framework
cf2e1ffc65a2684493cae60580fa76703fa006b7.json
Fix failing test Issue: SPR-10605
spring-websocket/src/test/java/org/springframework/web/socket/server/endpoint/SpringConfiguratorTests.java
@@ -79,8 +79,8 @@ public void getEndpointInstanceSingletonByType() throws Exception { @Test public void getEndpointInstanceSingletonByComponentName() throws Exception { - AlternativeEchoEndpoint expected = this.webAppContext.getBean(AlternativeEchoEndpoint.class); - AlternativeEchoEndpoint actual = this.configu...
false
Other
spring-projects
spring-framework
64baef9f19cc8d797da6f8757c17771192288ffa.json
Fix failing tests Issue: SPR-10825
spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java
@@ -318,7 +318,9 @@ private void registerMvcSingletons(StubWebApplicationContext cxt) { StandaloneConfiguration config = new StandaloneConfiguration(); - StaticRequestMappingHandlerMapping hm = config.getHandlerMapping(cxt); + StaticRequestMappingHandlerMapping hm = config.getHandlerMapping(); + hm.setServlet...
false
Other
spring-projects
spring-framework
47d40053a41466bb2728229bc4cf0c73968d0ced.json
Add Jackson serialization inclusion to FactoryBean Issue: SPR-10810
spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java
@@ -22,6 +22,12 @@ import java.util.LinkedHashMap; import java.util.Map; +import org.springframework.beans.FatalBeanException; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.util.Assert; + +import com.fasterxml.jackson.a...
true
Other
spring-projects
spring-framework
47d40053a41466bb2728229bc4cf0c73968d0ced.json
Add Jackson serialization inclusion to FactoryBean Issue: SPR-10810
spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBeanTests.java
@@ -16,34 +16,37 @@ package org.springframework.http.converter.json; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import java.text.SimpleDateFormat; +import java.util.Collecti...
true
Other
spring-projects
spring-framework
13ce20b1ca14320dd3ddab516aff495753a2feae.json
Remove IOException from HandshakeHandler
spring-websocket/src/main/java/org/springframework/web/socket/server/DefaultHandshakeHandler.java
@@ -132,50 +132,55 @@ public String[] getSupportedProtocols() { @Override public final boolean doHandshake(ServerHttpRequest request, ServerHttpResponse response, - WebSocketHandler webSocketHandler, Map<String, Object> attributes) throws IOException, HandshakeFailureException { + WebSocketHandler wsHandler, ...
true
Other
spring-projects
spring-framework
13ce20b1ca14320dd3ddab516aff495753a2feae.json
Remove IOException from HandshakeHandler
spring-websocket/src/main/java/org/springframework/web/socket/server/HandshakeFailureException.java
@@ -34,12 +34,19 @@ @SuppressWarnings("serial") public class HandshakeFailureException extends NestedRuntimeException { - public HandshakeFailureException(String msg, Throwable cause) { - super(msg, cause); + + /** + * Constructor with message and root cause. + */ + public HandshakeFailureException(String messag...
true
Other
spring-projects
spring-framework
13ce20b1ca14320dd3ddab516aff495753a2feae.json
Remove IOException from HandshakeHandler
spring-websocket/src/main/java/org/springframework/web/socket/server/HandshakeHandler.java
@@ -16,7 +16,6 @@ package org.springframework.web.socket.server; -import java.io.IOException; import java.util.Map; import org.springframework.http.server.ServerHttpRequest; @@ -36,6 +35,7 @@ */ public interface HandshakeHandler { + /** * Initiate the handshake. * @@ -51,14 +51,11 @@ public interf...
true
Other
spring-projects
spring-framework
13ce20b1ca14320dd3ddab516aff495753a2feae.json
Remove IOException from HandshakeHandler
spring-websocket/src/main/java/org/springframework/web/socket/server/RequestUpgradeStrategy.java
@@ -16,7 +16,6 @@ package org.springframework.web.socket.server; -import java.io.IOException; import java.util.Map; import org.springframework.http.server.ServerHttpRequest; @@ -53,6 +52,6 @@ public interface RequestUpgradeStrategy { * handshake request. */ void upgrade(ServerHttpRequest reques...
true
Other
spring-projects
spring-framework
13ce20b1ca14320dd3ddab516aff495753a2feae.json
Remove IOException from HandshakeHandler
spring-websocket/src/main/java/org/springframework/web/socket/server/support/AbstractStandardUpgradeStrategy.java
@@ -16,7 +16,6 @@ package org.springframework.web.socket.server.support; -import java.io.IOException; import java.net.InetSocketAddress; import java.util.Map; @@ -34,7 +33,8 @@ import org.springframework.web.socket.server.RequestUpgradeStrategy; /** - * A {@link RequestUpgradeStrategy} for containers that ...
true
Other
spring-projects
spring-framework
13ce20b1ca14320dd3ddab516aff495753a2feae.json
Remove IOException from HandshakeHandler
spring-websocket/src/main/java/org/springframework/web/socket/server/support/GlassFishRequestUpgradeStrategy.java
@@ -70,7 +70,7 @@ public String[] getSupportedVersions() { @Override public void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, - String selectedProtocol, Endpoint endpoint) throws IOException, HandshakeFailureException { + String selectedProtocol, Endpoint endpoint) throws HandshakeF...
true
Other
spring-projects
spring-framework
13ce20b1ca14320dd3ddab516aff495753a2feae.json
Remove IOException from HandshakeHandler
spring-websocket/src/main/java/org/springframework/web/socket/server/support/JettyRequestUpgradeStrategy.java
@@ -44,30 +44,26 @@ * {@code org.eclipse.jetty.websocket.server.WebSocketHandler} class. * * @author Phillip Webb + * @author Rossen Stoyanchev * @since 4.0 */ public class JettyRequestUpgradeStrategy implements RequestUpgradeStrategy { - // FIXME jetty has options, timeouts etc. Do we need a common abstra...
true
Other
spring-projects
spring-framework
13ce20b1ca14320dd3ddab516aff495753a2feae.json
Remove IOException from HandshakeHandler
spring-websocket/src/main/java/org/springframework/web/socket/server/support/TomcatRequestUpgradeStrategy.java
@@ -16,11 +16,13 @@ package org.springframework.web.socket.server.support; +import java.io.IOException; import java.util.Arrays; import java.util.Collections; import java.util.Map; import javax.servlet.ServletContext; +import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; imp...
true
Other
spring-projects
spring-framework
13ce20b1ca14320dd3ddab516aff495753a2feae.json
Remove IOException from HandshakeHandler
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsException.java
@@ -30,6 +30,10 @@ public class SockJsException extends NestedRuntimeException { private final String sessionId; + public SockJsException(String message, Throwable cause) { + this(message, null, cause); + } + public SockJsException(String message, String sessionId, Throwable cause) { super(message, cause); ...
true