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 | 6ad79e03c615d7dca2ab4b2ae7bf8ba6881448bc.json | Create SockJS ThreadPoolTaskScheduler extension
Commit 5d2e6f enabled the setRemoveOnCancelPolicy of the SockJS
ScheduledThreadPoolExecutor by default. However that property is only
available in JDK 1.7 or later. This change fixes the issue and
introduces an extension of ThreadPoolTaskScheduler for for use with
SockJS... | spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java | @@ -16,6 +16,7 @@
package org.springframework.web.socket.config;
+import org.springframework.web.socket.sockjs.transport.SockJsThreadPoolTaskScheduler;
import org.w3c.dom.Element;
import org.springframework.beans.factory.config.BeanDefinition;
@@ -24,18 +25,12 @@
import org.springframework.beans.factory.suppo... | true |
Other | spring-projects | spring-framework | 6ad79e03c615d7dca2ab4b2ae7bf8ba6881448bc.json | Create SockJS ThreadPoolTaskScheduler extension
Commit 5d2e6f enabled the setRemoveOnCancelPolicy of the SockJS
ScheduledThreadPoolExecutor by default. However that property is only
available in JDK 1.7 or later. This change fixes the issue and
introduces an extension of ThreadPoolTaskScheduler for for use with
SockJS... | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java | @@ -20,11 +20,7 @@
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.handler.AbstractHandlerMapping;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.RejectedExecutionHand... | true |
Other | spring-projects | spring-framework | 6ad79e03c615d7dca2ab4b2ae7bf8ba6881448bc.json | Create SockJS ThreadPoolTaskScheduler extension
Commit 5d2e6f enabled the setRemoveOnCancelPolicy of the SockJS
ScheduledThreadPoolExecutor by default. However that property is only
available in JDK 1.7 or later. This change fixes the issue and
introduces an extension of ThreadPoolTaskScheduler for for use with
SockJS... | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupport.java | @@ -17,20 +17,16 @@
package org.springframework.web.socket.config.annotation;
import java.util.Collections;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.RejectedExecutionHandler;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
im... | true |
Other | spring-projects | spring-framework | 6ad79e03c615d7dca2ab4b2ae7bf8ba6881448bc.json | Create SockJS ThreadPoolTaskScheduler extension
Commit 5d2e6f enabled the setRemoveOnCancelPolicy of the SockJS
ScheduledThreadPoolExecutor by default. However that property is only
available in JDK 1.7 or later. This change fixes the issue and
introduces an extension of ThreadPoolTaskScheduler for for use with
SockJS... | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsThreadPoolTaskScheduler.java | @@ -0,0 +1,66 @@
+/*
+ * Copyright 2002-2014 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 | 32852e0843d50615b370d3d379fd47e4b1cd60f3.json | Improve doc on authentication for stomp/websocket | src/asciidoc/index.adoc | @@ -37697,10 +37697,10 @@ Or if connecting via WebSocket (without SockJS):
}
----
-Note that the stompClient above need does not specify a `login` and `passcode` headers.
+Note that the stompClient above does not need to specify a `login` and `passcode` headers.
Even if it did, they would be ignored, or rather ov... | false |
Other | spring-projects | spring-framework | e6e12be5ef12d5e6d8cb8702ba0e2354b72f83f0.json | Fix typo in documentation | src/asciidoc/index.adoc | @@ -37340,7 +37340,7 @@ e.g. for authentication purposes or clustering with sticky sessions.
Spring's SockJS support includes a property called `sessionCookieNeeded`.
It is enabled by default since most Java applications rely on the `JSESSIONID`
cookie. If your application does not need it, you can turn off this opt... | false |
Other | spring-projects | spring-framework | 5dbcd76a71f262510be7ac84b3b2679d716ff76a.json | Add doc section on configuration and performance
Issue: SPR-11450 | src/asciidoc/index.adoc | @@ -37665,7 +37665,7 @@ sections <<websocket-stomp-handle-broker-relay-configure>> and
<<websocket-stomp-handle-user>> for more information on authentication.
-[[websocket-stomp-handle]]
+[[websocket-stomp-message-flow]]
==== Flow of Messages
When a STOMP endpoint is configured, the Spring application becomes ... | false |
Other | spring-projects | spring-framework | 2c1d5efbb021d7eed196bad550bcd675d43035b9.json | Introduce base exception class for arg resolution
Issue: SPR-11584 | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AbstractMethodArgumentResolutionException.java | @@ -0,0 +1,68 @@
+/*
+ * Copyright 2002-2014 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 | 2c1d5efbb021d7eed196bad550bcd675d43035b9.json | Introduce base exception class for arg resolution
Issue: SPR-11584 | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MessageMethodArgumentResolver.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -21,6 +21,8 @@
import org.springframework.m... | true |
Other | spring-projects | spring-framework | 2c1d5efbb021d7eed196bad550bcd675d43035b9.json | Introduce base exception class for arg resolution
Issue: SPR-11584 | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MethodArgumentNotValidException.java | @@ -18,30 +18,26 @@
import org.springframework.core.MethodParameter;
import org.springframework.messaging.Message;
-import org.springframework.messaging.MessagingException;
import org.springframework.validation.BindingResult;
import org.springframework.validation.ObjectError;
/**
- * Exception to be thrown whe... | true |
Other | spring-projects | spring-framework | 2c1d5efbb021d7eed196bad550bcd675d43035b9.json | Introduce base exception class for arg resolution
Issue: SPR-11584 | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/MethodArgumentTypeMismatchException.java | @@ -16,6 +16,7 @@
package org.springframework.messaging.handler.annotation.support;
+import org.springframework.core.MethodParameter;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
@@ -26,9 +27,14 @@
* @author Stephane Nicoll
* @since 4.0.3
*/
-publ... | true |
Other | spring-projects | spring-framework | 2c1d5efbb021d7eed196bad550bcd675d43035b9.json | Introduce base exception class for arg resolution
Issue: SPR-11584 | spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/MessageMethodArgumentResolverTests.java | @@ -33,6 +33,8 @@
import org.springframework.messaging.support.MessageBuilder;
/**
+ * Unit tests for
+ * {@link org.springframework.messaging.handler.annotation.support.MessageMethodArgumentResolver}.
*
* @author Stephane Nicoll
*/
@@ -45,101 +47,102 @@ public class MessageMethodArgumentResolverTests {
p... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-messaging/src/main/java/org/springframework/messaging/simp/config/MessageBrokerRegistry.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -47,6 +47,8 @@ public class MessageBrokerReg... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/BufferingStompDecoder.java | @@ -31,7 +31,7 @@
/**
- * A an extension of {@link org.springframework.messaging.simp.stomp.StompDecoder}
+ * An extension of {@link org.springframework.messaging.simp.stomp.StompDecoder}
* that chunks any bytes remaining after a single full STOMP frame has been read.
* The remaining bytes may contain more STO... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java | @@ -124,8 +124,11 @@ public BeanDefinition parse(Element element, ParserContext parserCxt) {
beanName = registerBeanDef(beanDef, parserCxt, source);
RuntimeBeanReference userSessionRegistry = new RuntimeBeanReference(beanName);
+ String frameBufferSizeAttribute = element.getAttribute("message-buffer-size");
+ ... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java | @@ -21,6 +21,7 @@
import java.util.List;
import java.util.Map;
+import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.messaging.simp.user.UserSessionRegistry;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.util.Assert;
@@ -57,7 +58,8 @... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupport.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -42,7 +42,8 @@ protected WebSocketMessageBro... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java | @@ -79,16 +79,16 @@ public class StompSubProtocolHandler implements SubProtocolHandler {
/**
- * TODO
- * @param messageBufferSizeLimit
+ * Set the message buffer size limit in bytes.
+ * @since 4.0.3
*/
public void setMessageBufferSizeLimit(int messageBufferSizeLimit) {
this.messageBufferSizeLimit = ... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd | @@ -575,6 +575,13 @@
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
+ <xsd:attribute name="message-buffer-size" type="xsd:int">
+ <xsd:annotation>
+ <xsd:documentation><![CDATA[
+ The message buffer size limit in bytes for simple messaging protocol... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java | @@ -114,6 +114,9 @@ public void simpleBroker() {
(StompSubProtocolHandler) subProtocolWsHandler.getProtocolHandlerMap().get("v12.stomp");
assertNotNull(stompHandler);
+ int messageBufferSizeLimit = (int)new DirectFieldAccessor(stompHandler).getPropertyValue("messageBufferSizeLimit");
+ assertEquals(123, me... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistryTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -22,8 +22,8 @@
import org.junit.Test;
impo... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupportTests.java | @@ -24,11 +24,13 @@
import org.junit.Before;
import org.junit.Test;
+import org.springframework.beans.DirectFieldAccessor;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configurat... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/test/java/org/springframework/web/socket/handler/TestWebSocketSession.java | @@ -62,6 +62,12 @@ public class TestWebSocketSession implements WebSocketSession {
private HttpHeaders headers;
+ public TestWebSocketSession() {
+ }
+
+ public TestWebSocketSession(String id) {
+ this.id = id;
+ }
@Override
public String getId() { | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java | @@ -146,8 +146,10 @@ public void handleMessageToClientConnectAck() {
assertEquals(1, this.session.getSentMessages().size());
TextMessage textMessage = (TextMessage) this.session.getSentMessages().get(0);
- List<Message<byte[]>> message = new StompDecoder().decode(ByteBuffer.wrap(textMessage.getPayload().getByt... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-broker-simple.xml | @@ -4,7 +4,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/websocket http://www.springframework.org/schema/websocket/spring-websocket-4.0.xsd">
- <websocket:message-broker application-... | true |
Other | spring-projects | spring-framework | bbdb72d8087449ffb8758ac40dfaab60e4bb7f47.json | Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.
Issue: SPR-11527 | src/asciidoc/index.adoc | @@ -37563,7 +37563,8 @@ The Spring Framework provides support for using STOMP over WebSocket through
the +spring-messaging+ and +spring-websocket+ modules. It's easy to enable it.
Here is an example of configuring a STOMP WebSocket endpoint with SockJS fallback
-options. The endpoint is available for clients to con... | true |
Other | spring-projects | spring-framework | 9bda734e0a1bd571078bc2e7c7b41065a7d53fa3.json | Improve method order in MockMvcRequestBuilders | spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java | @@ -133,14 +133,14 @@ public class MockHttpServletRequestBuilder implements RequestBuilder, Mergeable
* the {@code MockHttpServletRequest} can be plugged in via
* {@link #with(RequestPostProcessor)}.
* @param httpMethod the HTTP method (GET, POST, etc)
- * @param url the URL
+ * @param uri the URL
* @sinc... | true |
Other | spring-projects | spring-framework | 9bda734e0a1bd571078bc2e7c7b41065a7d53fa3.json | Improve method order in MockMvcRequestBuilders | spring-test/src/main/java/org/springframework/test/web/servlet/request/MockMultipartHttpServletRequestBuilder.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -59,11 +59,11 @@ public class MockMultipartH... | true |
Other | spring-projects | spring-framework | 9bda734e0a1bd571078bc2e7c7b41065a7d53fa3.json | Improve method order in MockMvcRequestBuilders | spring-test/src/main/java/org/springframework/test/web/servlet/request/MockMvcRequestBuilders.java | @@ -47,6 +47,15 @@ public static MockHttpServletRequestBuilder get(String urlTemplate, Object... ur
return new MockHttpServletRequestBuilder(HttpMethod.GET, urlTemplate, urlVariables);
}
+ /**
+ * Create a {@link MockHttpServletRequestBuilder} for a GET request.
+ * @param uri the URL
+ * @since 4.0.3
+ */
+... | true |
Other | spring-projects | spring-framework | 5ab04335439d436336e50756f0465c897d004970.json | Introduce Tiles version constants in Gradle build | build.gradle | @@ -26,6 +26,9 @@ configure(allprojects) { project ->
ext.jodaVersion = "2.3"
ext.junitVersion = "4.11"
ext.slf4jVersion = "1.7.5"
+ ext.tilesRequestVersion = "1.0.3"
+ ext.tiles2Version = "2.2.2"
+ ext.tiles3Version = "3.0.3"
ext.xstreamVersion = "1.4.6"
ext.gr... | false |
Other | spring-projects | spring-framework | cbd5af3a0352e408bccac7763a9ea7f1e94fc516.json | Add CloseStatus to indicate unreliable session
When a send timeout is detected, the WebSocket session is now closed
with a custom close status that indicates so. This allows skipping
parts of the close logic that may cause further hanging.
Issue: SPR-11450 | spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java | @@ -134,6 +134,17 @@ public final class CloseStatus {
public static final CloseStatus TLS_HANDSHAKE_FAILURE = new CloseStatus(1015);
+ /**
+ * Indicates that a session has become unreliable (e.g. timed out while sending
+ * a message) and extra care should be exercised while closing the session in
+ * order to... | true |
Other | spring-projects | spring-framework | cbd5af3a0352e408bccac7763a9ea7f1e94fc516.json | Add CloseStatus to indicate unreliable session
When a send timeout is detected, the WebSocket session is now closed
with a custom close status that indicates so. This allows skipping
parts of the close logic that may cause further hanging.
Issue: SPR-11450 | spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java | @@ -18,6 +18,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.WebSocketMessage;
import org.springframework.web.socket.WebSocketSession;
@@ -58,7 +59,7 @@ public class ConcurrentWebS... | true |
Other | spring-projects | spring-framework | cbd5af3a0352e408bccac7763a9ea7f1e94fc516.json | Add CloseStatus to indicate unreliable session
When a send timeout is detected, the WebSocket session is now closed
with a custom close status that indicates so. This allows skipping
parts of the close logic that may cause further hanging.
Issue: SPR-11450 | spring-websocket/src/main/java/org/springframework/web/socket/handler/SessionLimitExceededException.java | @@ -16,6 +16,8 @@
package org.springframework.web.socket.handler;
+import org.springframework.web.socket.CloseStatus;
+
/**
* Raised when a WebSocket session has exceeded limits it has been configured
* for, e.g. timeout, buffer size, etc.
@@ -26,9 +28,17 @@
@SuppressWarnings("serial")
public class SessionL... | true |
Other | spring-projects | spring-framework | cbd5af3a0352e408bccac7763a9ea7f1e94fc516.json | Add CloseStatus to indicate unreliable session
When a send timeout is detected, the WebSocket session is now closed
with a custom close status that indicates so. This allows skipping
parts of the close logic that may cause further hanging.
Issue: SPR-11450 | spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java | @@ -235,8 +235,16 @@ public void afterConnectionEstablished(WebSocketSession session) throws Exceptio
}
protected final SubProtocolHandler findProtocolHandler(WebSocketSession session) {
+
+ String protocol = null;
+ try {
+ protocol = session.getAcceptedProtocol();
+ }
+ catch (Exception ex) {
+ logger.w... | true |
Other | spring-projects | spring-framework | cbd5af3a0352e408bccac7763a9ea7f1e94fc516.json | Add CloseStatus to indicate unreliable session
When a send timeout is detected, the WebSocket session is now closed
with a custom close status that indicates so. This allows skipping
parts of the close logic that may cause further hanging.
Issue: SPR-11450 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java | @@ -96,6 +96,7 @@ public abstract class AbstractSockJsSession implements SockJsSession {
private final Map<String, Object> attributes;
+
private volatile State state = State.NEW;
private final long timeCreated = System.currentTimeMillis();
@@ -259,7 +260,7 @@ public final void close(CloseStatus status) thro... | true |
Other | spring-projects | spring-framework | cbd5af3a0352e408bccac7763a9ea7f1e94fc516.json | Add CloseStatus to indicate unreliable session
When a send timeout is detected, the WebSocket session is now closed
with a custom close status that indicates so. This allows skipping
parts of the close logic that may cause further hanging.
Issue: SPR-11450 | spring-websocket/src/test/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecoratorTests.java | @@ -17,6 +17,7 @@
package org.springframework.web.socket.handler;
import org.junit.Test;
+import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketMessage;
@@ -136,6 +137,7 @@ public void run() {
fail("Expected excep... | true |
Other | spring-projects | spring-framework | 682e8fb3ad5e66ae42995b999bec062eb76247c3.json | Reduce code duplication in MergedSqlConfig | spring-test/src/main/java/org/springframework/test/context/jdbc/MergedSqlConfig.java | @@ -56,52 +56,21 @@ class MergedSqlConfig {
private final ErrorMode errorMode;
- private static TransactionMode retrieveTransactionMode(AnnotationAttributes attributes) {
- TransactionMode transactionMode = attributes.getEnum("transactionMode");
- if (transactionMode == TransactionMode.DEFAULT) {
- transactio... | false |
Other | spring-projects | spring-framework | 84c11a5cc742c024733a9279007f735e329e2665.json | Allow interceptors with excludePathPattern only
Issue: SPR-11130 | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -82,7 +82,7 @@ public InterceptorRegistratio... | true |
Other | spring-projects | spring-framework | 84c11a5cc742c024733a9279007f735e329e2665.json | Allow interceptors with excludePathPattern only
Issue: SPR-11130 | spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/InterceptorRegistryTests.java | @@ -138,21 +138,35 @@ public void addWebRequestInterceptorsWithUrlPatterns() throws Exception {
verifyAdaptedInterceptor(interceptors.get(0), webRequestInterceptor2);
}
+ /**
+ * Test for SPR-11130
+ */
+ @Test
+ public void addInterceptorWithExcludePathPatternOnly() {
+ registry.addInterceptor(interceptor1).... | true |
Other | spring-projects | spring-framework | 0bbb7704b517f0721ee1ac810b854fbc3f30697f.json | Add propagateQueryParams property to RedirectView
This change makes it possible to configure RedirectView such that the
query string of the current request is added to the target URL.
This change is preparation for SPR-11543. | spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -53,7 +53,7 @@
import org.springframework.w... | true |
Other | spring-projects | spring-framework | 0bbb7704b517f0721ee1ac810b854fbc3f30697f.json | Add propagateQueryParams property to RedirectView
This change makes it possible to configure RedirectView such that the
query string of the current request is added to the target URL.
This change is preparation for SPR-11543. | spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java | @@ -325,6 +325,19 @@ public void objectConversion() throws Exception {
doTest(model, url, false, expectedUrlForEncoding);
}
+ @Test
+ public void propagateQueryParams() throws Exception {
+ RedirectView rv = new RedirectView();
+ rv.setPropagateQueryParams(true);
+ rv.setUrl("http://url.somewhere.com?foo=bar#... | true |
Other | spring-projects | spring-framework | dfcc1d7e8c8051004b6a8cd8329eed0f6c71efd2.json | Add default ViewResolver to MVC Java config
Since the MVC Java config always registers a ViewResolver (composite)
bean, at a very minimum we must add an InternalResourceViewResolver
consistent with default DispatcherServlet configuration and by
extension with the MVC namespace which falls back on DispatcherServlet
imp... | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java | @@ -81,6 +81,7 @@
import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver;
import org.springframework.web.servlet.resource.ResourceUrlProvider;
import org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor;
+import org.springframework.web.servlet.view.InternalResou... | true |
Other | spring-projects | spring-framework | dfcc1d7e8c8051004b6a8cd8329eed0f6c71efd2.json | Add default ViewResolver to MVC Java config
Since the MVC Java config always registers a ViewResolver (composite)
bean, at a very minimum we must add an InternalResourceViewResolver
consistent with default DispatcherServlet configuration and by
extension with the MVC namespace which falls back on DispatcherServlet
imp... | spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportTests.java | @@ -49,6 +49,7 @@
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.HandlerExecutionChain;
import org.springframework.web.servlet.ViewResolver;
+import org.springframework.web.servlet.view.InternalResourceViewResolver;
import org.springframework.web.servlet.view... | true |
Other | spring-projects | spring-framework | 2e75adb04c02b8904c59bd5820336104594ce3fb.json | Improve transaction management for @Sql scripts
Prior to this commit, the support for SQL script execution via @Sql
provided an algorithm for looking up a required
PlatformTransactionManager to use to drive transactions. However, a
transaction manager is not actually required for all testing scenarios.
This commit im... | spring-test/src/main/java/org/springframework/test/context/jdbc/Sql.java | @@ -22,9 +22,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import org.springframework.jdbc.datasource.init.ScriptUtils;
-import org.springframework.util.ResourceUtils;
-
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@@ ... | true |
Other | spring-projects | spring-framework | 2e75adb04c02b8904c59bd5820336104594ce3fb.json | Improve transaction management for @Sql scripts
Prior to this commit, the support for SQL script execution via @Sql
provided an algorithm for looking up a required
PlatformTransactionManager to use to drive transactions. However, a
transaction manager is not actually required for all testing scenarios.
This commit im... | spring-test/src/main/java/org/springframework/test/context/jdbc/SqlConfig.java | @@ -21,8 +21,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import org.springframework.jdbc.datasource.init.ScriptUtils;
-
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@@ -46,7 +44,7 @@
* attribute. Thus, in order to ... | true |
Other | spring-projects | spring-framework | 2e75adb04c02b8904c59bd5820336104594ce3fb.json | Improve transaction management for @Sql scripts
Prior to this commit, the support for SQL script execution via @Sql
provided an algorithm for looking up a required
PlatformTransactionManager to use to drive transactions. However, a
transaction manager is not actually required for all testing scenarios.
This commit im... | spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java | @@ -43,6 +43,7 @@
import org.springframework.transaction.support.TransactionTemplate;
import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;
+import org.springframework.util.ReflectionUtils;
import org.springframework.util.ResourceUtils;
/**
@@ -165,24 +166,77 @@ private void ex... | true |
Other | spring-projects | spring-framework | 2e75adb04c02b8904c59bd5820336104594ce3fb.json | Improve transaction management for @Sql scripts
Prior to this commit, the support for SQL script execution via @Sql
provided an algorithm for looking up a required
PlatformTransactionManager to use to drive transactions. However, a
transaction manager is not actually required for all testing scenarios.
This commit im... | spring-test/src/main/java/org/springframework/test/context/transaction/TestContextTransactionUtils.java | @@ -66,21 +66,23 @@ private TestContextTransactionUtils() {
/**
* Retrieve the {@link DataSource} to use for the supplied {@linkplain TestContext
* test context}.
- * <p>The following algorithm is used to retrieve the {@code DataSource}
- * from the {@link org.springframework.context.ApplicationContext Applic... | true |
Other | spring-projects | spring-framework | 2e75adb04c02b8904c59bd5820336104594ce3fb.json | Improve transaction management for @Sql scripts
Prior to this commit, the support for SQL script execution via @Sql
provided an algorithm for looking up a required
PlatformTransactionManager to use to drive transactions. However, a
transaction manager is not actually required for all testing scenarios.
This commit im... | spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java | @@ -275,8 +275,10 @@ protected PlatformTransactionManager getTransactionManager(TestContext testConte
}
catch (RuntimeException ex) {
if (logger.isWarnEnabled()) {
- logger.warn("Caught exception while retrieving transaction manager for test context " + testContext
- + " and qualifier [" + qualif... | true |
Other | spring-projects | spring-framework | 2e75adb04c02b8904c59bd5820336104594ce3fb.json | Improve transaction management for @Sql scripts
Prior to this commit, the support for SQL script execution via @Sql
provided an algorithm for looking up a required
PlatformTransactionManager to use to drive transactions. However, a
transaction manager is not actually required for all testing scenarios.
This commit im... | spring-test/src/test/java/org/springframework/test/context/jdbc/DataSourceOnlySqlScriptsTests.java | @@ -0,0 +1,92 @@
+/*
+ * Copyright 2002-2014 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 | 2e75adb04c02b8904c59bd5820336104594ce3fb.json | Improve transaction management for @Sql scripts
Prior to this commit, the support for SQL script execution via @Sql
provided an algorithm for looking up a required
PlatformTransactionManager to use to drive transactions. However, a
transaction manager is not actually required for all testing scenarios.
This commit im... | spring-test/src/test/java/org/springframework/test/context/jdbc/InferredDataSourceSqlScriptsTests.java | @@ -0,0 +1,116 @@
+/*
+ * Copyright 2002-2014 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 | 2e75adb04c02b8904c59bd5820336104594ce3fb.json | Improve transaction management for @Sql scripts
Prior to this commit, the support for SQL script execution via @Sql
provided an algorithm for looking up a required
PlatformTransactionManager to use to drive transactions. However, a
transaction manager is not actually required for all testing scenarios.
This commit im... | spring-test/src/test/java/org/springframework/test/context/jdbc/InferredDataSourceTransactionalSqlScriptsTests.java | @@ -0,0 +1,120 @@
+/*
+ * Copyright 2002-2014 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 | 2e75adb04c02b8904c59bd5820336104594ce3fb.json | Improve transaction management for @Sql scripts
Prior to this commit, the support for SQL script execution via @Sql
provided an algorithm for looking up a required
PlatformTransactionManager to use to drive transactions. However, a
transaction manager is not actually required for all testing scenarios.
This commit im... | spring-test/src/test/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListenerTests.java | @@ -18,9 +18,14 @@
import org.junit.Test;
import org.mockito.Mockito;
+import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.core.io.Resource;
import org.springframework.test.context.TestContext;
+import org.s... | true |
Other | spring-projects | spring-framework | e8d8c3390a0626308b770c5860c11704f5c52e06.json | Increase timeout in integration test | spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerIntegrationTests.java | @@ -277,7 +277,7 @@ public void publishEvent(ApplicationEvent event) {
}
public void expectBrokerAvailabilityEvent(boolean isBrokerAvailable) throws InterruptedException {
- BrokerAvailabilityEvent event = this.eventQueue.poll(10000, TimeUnit.MILLISECONDS);
+ BrokerAvailabilityEvent event = this.eventQueue.... | false |
Other | spring-projects | spring-framework | c2908399141381de5b9f79f29d5b90c822a7b7e3.json | Investigate claim on SO regarding ctx cache in TCF
This commit introduces a test that investigates a claim made on Stack
Overflow regarding context caching in the TestContext Framework (TCF). | spring-test/src/test/java/org/springframework/test/context/support/AbstractContextLoaderUtilsTests.java | @@ -36,6 +36,7 @@
import org.springframework.test.context.ContextLoader;
import org.springframework.test.context.MergedContextConfiguration;
import org.springframework.test.context.TestContextBootstrapper;
+import org.springframework.test.context.web.WebAppConfiguration;
import static org.junit.Assert.*;
@@ -17... | true |
Other | spring-projects | spring-framework | c2908399141381de5b9f79f29d5b90c822a7b7e3.json | Investigate claim on SO regarding ctx cache in TCF
This commit introduces a test that investigates a claim made on Stack
Overflow regarding context caching in the TestContext Framework (TCF). | spring-test/src/test/java/org/springframework/test/context/support/ContextLoaderUtilsMergedConfigTests.java | @@ -25,6 +25,10 @@
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.ContextLoader;
import org.springframework.test.context.MergedContextConfiguration;
+import org.springframework.test.context.web.WebDelegatingSmartContextLoader;
+import org.springframework.test.co... | true |
Other | spring-projects | spring-framework | da5b0b97d3a4f425576fe216ef6b5d1e4465af84.json | Update Javadoc in SqlScriptsTestExecutionListener | spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java | @@ -127,9 +127,8 @@ private void executeSqlScripts(TestContext testContext, ExecutionPhase execution
* Execute the SQL scripts configured via the supplied {@link Sql @Sql}
* annotation for the given {@link ExecutionPhase} and {@link TestContext}.
*
- * <p>Special care must be taken in order to properly suppo... | false |
Other | spring-projects | spring-framework | 5cb046da3db9f175a0ee099fd2f2111ea01f996d.json | Update Javadoc in SqlScriptsTestExecutionListener | spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java | @@ -55,8 +55,8 @@
* value of the {@link Sql#executionPhase executionPhase} flag.
*
* <p>Scripts will be executed either within an existing Spring-managed transaction
- * or within a new, isolated transaction, depending on the configured value of the
- * {@link Sql#requireNewTransaction requireNewTransaction} flag... | false |
Other | spring-projects | spring-framework | a48851509735d85db4632a6eff2de2248299db40.json | Simplify logic in MergedSqlConfig | spring-test/src/main/java/org/springframework/test/context/jdbc/MergedSqlConfig.java | @@ -74,31 +74,31 @@ private static ErrorMode retrieveErrorMode(AnnotationAttributes attributes) {
private static String retrieveSeparator(AnnotationAttributes attributes) {
String separator = attributes.getString("separator");
- if (separator != null && separator.equals("")) {
+ if ("".equals(separator)) {
... | false |
Other | spring-projects | spring-framework | fac0599aefa1b5f04101e391f661569c7ba7beb7.json | Add cache abstraction tests using JSR-107
This commit adds an extra test implementation that runs the cache
abstraction tests using a JSR-107 cache manager. This further covers
JCacheCacheManager.
The actual JSR-107 implementation is ehcache-jcache that requires at
least ehcache 2.8.3. Since the ehcache-core artifact... | build.gradle | @@ -15,6 +15,8 @@ configure(allprojects) { project ->
ext.aspectjVersion = "1.8.1"
ext.eclipseLinkVersion = "2.4.2"
+ ext.ehcacheVersion = "2.8.3"
+ ext.ehcacheJCacheVersion = "1.0.0"
ext.groovyVersion = "2.3.3"
ext.hibernate3Version = "3.6.10.Final"
ext.hibernate4Version = "4.3.5... | true |
Other | spring-projects | spring-framework | fac0599aefa1b5f04101e391f661569c7ba7beb7.json | Add cache abstraction tests using JSR-107
This commit adds an extra test implementation that runs the cache
abstraction tests using a JSR-107 cache manager. This further covers
JCacheCacheManager.
The actual JSR-107 implementation is ehcache-jcache that requires at
least ehcache 2.8.3. Since the ehcache-core artifact... | spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheFactoryBean.java | @@ -97,6 +97,7 @@ public class EhCacheFactoryBean extends CacheConfiguration implements FactoryBea
private Ehcache cache;
+ @SuppressWarnings("deprecation")
public EhCacheFactoryBean() {
setMaxEntriesLocalHeap(10000);
setMaxElementsOnDisk(10000000); | true |
Other | spring-projects | spring-framework | fac0599aefa1b5f04101e391f661569c7ba7beb7.json | Add cache abstraction tests using JSR-107
This commit adds an extra test implementation that runs the cache
abstraction tests using a JSR-107 cache manager. This further covers
JCacheCacheManager.
The actual JSR-107 implementation is ehcache-jcache that requires at
least ehcache 2.8.3. Since the ehcache-core artifact... | spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheTest.java | @@ -0,0 +1,116 @@
+/*
+ * Copyright 2002-2014 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 | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/main/java/org/springframework/test/context/jdbc/MergedSqlConfig.java | @@ -0,0 +1,232 @@
+/*
+ * Copyright 2002-2014 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 | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/main/java/org/springframework/test/context/jdbc/Sql.java | @@ -37,12 +37,13 @@
* <p>Script execution is performed by the {@link SqlScriptsTestExecutionListener},
* which is enabled by default.
*
- * <p>The configuration options provided by this annotation are equivalent to
- * those supported by {@link ScriptUtils} and
+ * <p>The configuration options provided by this an... | true |
Other | spring-projects | spring-framework | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/main/java/org/springframework/test/context/jdbc/SqlConfig.java | @@ -0,0 +1,263 @@
+/*
+ * Copyright 2002-2014 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 | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java | @@ -29,6 +29,8 @@
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
import org.springframework.test.context.TestContext;
import org.springframework.test.context.jdbc.Sql.ExecutionPhase;
+import org.springframework.test.context.jdbc.SqlConfig.ErrorMode;
+import org.springframework.test.contex... | true |
Other | spring-projects | spring-framework | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/test/java/org/springframework/test/context/jdbc/CustomScriptSyntaxSqlScriptsTests.java | @@ -25,7 +25,7 @@
/**
* Integration tests that verify support for custom SQL script syntax
- * configured via {@link Sql @Sql}.
+ * configured via {@link SqlConfig @SqlConfig}.
*
* @author Sam Brannen
* @since 4.1
@@ -35,16 +35,9 @@
public class CustomScriptSyntaxSqlScriptsTests extends AbstractTransactiona... | true |
Other | spring-projects | spring-framework | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/test/java/org/springframework/test/context/jdbc/GlobalCustomScriptSyntaxSqlScriptsTests.java | @@ -0,0 +1,49 @@
+/*
+ * Copyright 2002-2014 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 | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/test/java/org/springframework/test/context/jdbc/MergedSqlConfigTests.java | @@ -0,0 +1,177 @@
+/*
+ * Copyright 2002-2014 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 | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/test/java/org/springframework/test/context/jdbc/MultipleDataSourcesAndTransactionManagersSqlScriptsTests.java | @@ -40,6 +40,7 @@
/**
* Integration tests for {@link Sql @Sql} that verify support for multiple
* {@link DataSource}s and {@link PlatformTransactionManager}s.
+ * <p>Simultaneously tests for method-level overrides via {@code @SqlConfig}.
*
* @author Sam Brannen
* @since 4.1
@@ -48,6 +49,7 @@
@RunWith(Spring... | true |
Other | spring-projects | spring-framework | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/test/java/org/springframework/test/context/jdbc/MultipleDataSourcesAndTransactionManagersTransactionalSqlScriptsTests.java | @@ -48,6 +48,8 @@
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
@DirtiesContext
+@Transactional("txMgr1")
+@SqlConfig(dataSource = "dataSource1", transactionManager = "txMgr1")
public class MultipleDataSourcesAndTransactionManagersTransactionalSqlScriptsTests {
@Autowired
@@ -58,15 +60,14 @@ pub... | true |
Other | spring-projects | spring-framework | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/test/java/org/springframework/test/context/jdbc/RequiresNewTransactionSqlScriptsTests.java | @@ -19,6 +19,7 @@
import org.junit.Test;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.jdbc.SqlConfig.TransactionMode;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringC... | true |
Other | spring-projects | spring-framework | 628806e85b6b2ea412502af8d6eb11b60d7b5f0c.json | Introduce @SqlConfig for common SQL script config
Prior to this commit, @Sql provided attributes for configuring the
syntax of the referenced SQL scripts as well as exception handling and
transaction behavior; however, such configuration could not be reused
across @Sql declarations thus requiring developers to copy-an... | spring-test/src/test/java/org/springframework/test/context/jdbc/TransactionalAfterTestMethodSqlScriptsTests.java | @@ -62,7 +62,7 @@ public void afterTransaction() {
@Test
@SqlGroup({//
- @Sql({ "schema.sql", "data.sql" }),//
+ @Sql({ "schema.sql", "data.sql" }),//
@Sql(scripts = "drop-schema.sql", executionPhase = AFTER_TEST_METHOD) //
})
// test## is required for @FixMethodOrder. | true |
Other | spring-projects | spring-framework | 89b202029a81b94c98cda439547e10205f317ac7.json | Fix failing test | spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java | @@ -102,6 +102,7 @@ public void setup() throws Exception {
this.wac.register(TestConfig.class, upgradeStrategyConfigClass());
this.wac.refresh();
this.server = createWebSocketTestServer();
+ this.server.setup();
this.server.deployConfig(this.wac, this.errorFilter);
this.server.start();
this.baseUrl =... | false |
Other | spring-projects | spring-framework | d86e4cf2038ea67c51e0da4286034331225c16a6.json | Re-obtain port on every WebSocket integration test
This change adds a WebSocketTestServer setup method that initializes
the server and obtains a new port.
In turn AbstractWebSocketIntegrationTests invokes the new method from
its setup method thus ensuring a new port is used on every test. | spring-websocket/src/test/java/org/springframework/web/socket/AbstractWebSocketIntegrationTests.java | @@ -83,6 +83,7 @@ public void setup() throws Exception {
((Lifecycle) this.webSocketClient).start();
}
+ this.server.setup();
this.server.deployConfig(this.wac);
this.server.start();
}
@@ -99,14 +100,12 @@ public void teardown() throws Exception {
catch (Throwable t) {
logger.error("Failed to s... | true |
Other | spring-projects | spring-framework | d86e4cf2038ea67c51e0da4286034331225c16a6.json | Re-obtain port on every WebSocket integration test
This change adds a WebSocketTestServer setup method that initializes
the server and obtains a new port.
In turn AbstractWebSocketIntegrationTests invokes the new method from
its setup method thus ensuring a new port is used on every test. | spring-websocket/src/test/java/org/springframework/web/socket/JettyWebSocketTestServer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2014 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.
@@ -20,6 +20,7 @@
import org.eclipse.jetty.ser... | true |
Other | spring-projects | spring-framework | d86e4cf2038ea67c51e0da4286034331225c16a6.json | Re-obtain port on every WebSocket integration test
This change adds a WebSocketTestServer setup method that initializes
the server and obtains a new port.
In turn AbstractWebSocketIntegrationTests invokes the new method from
its setup method thus ensuring a new port is used on every test. | spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java | @@ -30,6 +30,7 @@
import org.apache.tomcat.util.descriptor.web.FilterMap;
import org.apache.tomcat.websocket.server.WsContextListener;
+import org.springframework.util.Assert;
import org.springframework.util.SocketUtils;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web... | true |
Other | spring-projects | spring-framework | d86e4cf2038ea67c51e0da4286034331225c16a6.json | Re-obtain port on every WebSocket integration test
This change adds a WebSocketTestServer setup method that initializes
the server and obtains a new port.
In turn AbstractWebSocketIntegrationTests invokes the new method from
its setup method thus ensuring a new port is used on every test. | spring-websocket/src/test/java/org/springframework/web/socket/UndertowTestServer.java | @@ -22,13 +22,15 @@
import javax.servlet.ServletException;
import io.undertow.Undertow;
+import io.undertow.server.HttpHandler;
import io.undertow.servlet.api.DeploymentInfo;
import io.undertow.servlet.api.DeploymentManager;
import io.undertow.servlet.api.FilterInfo;
import io.undertow.servlet.api.InstanceFacto... | true |
Other | spring-projects | spring-framework | d86e4cf2038ea67c51e0da4286034331225c16a6.json | Re-obtain port on every WebSocket integration test
This change adds a WebSocketTestServer setup method that initializes
the server and obtains a new port.
In turn AbstractWebSocketIntegrationTests invokes the new method from
its setup method thus ensuring a new port is used on every test. | spring-websocket/src/test/java/org/springframework/web/socket/WebSocketTestServer.java | @@ -29,6 +29,8 @@ public interface WebSocketTestServer {
int getPort();
+ void setup();
+
void deployConfig(WebApplicationContext cxt, Filter... filters);
void undeployConfig(); | true |
Other | spring-projects | spring-framework | ea7ae8949e1b0411beddd74347e5c33123d8a91d.json | Use regex comparison in WebSocket stats test
The output includes thread pool information which appears to not vary
enough to cause failures locally but does so on the build server. | spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java | @@ -257,14 +257,16 @@ public void stompBrokerRelay() {
String name = "webSocketMessageBrokerStats";
WebSocketMessageBrokerStats stats = this.appContext.getBean(name, WebSocketMessageBrokerStats.class);
- assertEquals("WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), " +
- "0 total, 0 closed abnor... | true |
Other | spring-projects | spring-framework | ea7ae8949e1b0411beddd74347e5c33123d8a91d.json | Use regex comparison in WebSocket stats test
The output includes thread pool information which appears to not vary
enough to cause failures locally but does so on the build server. | spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupportTests.java | @@ -22,6 +22,10 @@
import java.util.Set;
import java.util.concurrent.ScheduledThreadPoolExecutor;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.hamcrest.Matchers;
+import org.hamcrest.TypeSafeMatcher;
import org.junit.Before;
import org.junit.Test;
@@ -138,14 +142,16 @@ public void... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd | @@ -17,133 +17,133 @@
-->
<xsd:schema xmlns="http://www.springframework.org/schema/websocket"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:beans="http://www.springframework.org/schema/beans"
- targetNamespace="http://www.springframework.org/schema/websocket"
- ... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.1.xsd | @@ -17,134 +17,134 @@
-->
<xsd:schema xmlns="http://www.springframework.org/schema/websocket"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:beans="http://www.springframework.org/schema/beans"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:beans="http://www.springframewor... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-broker-converters-defaults-off.xml | @@ -1,19 +1,19 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/sch... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-broker-converters.xml | @@ -1,19 +1,19 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/sch... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-broker-customchannels-default-executor.xml | @@ -1,30 +1,30 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:websock... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-broker-customchannels.xml | @@ -1,34 +1,34 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/sch... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-broker-relay.xml | @@ -1,20 +1,20 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/sch... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-broker-simple.xml | @@ -1,33 +1,33 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/sch... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-handlers-attributes.xml | @@ -1,24 +1,24 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:websock... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-handlers-sockjs-attributes.xml | @@ -1,29 +1,29 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:websock... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-handlers-sockjs.xml | @@ -1,17 +1,17 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:websock... | true |
Other | spring-projects | spring-framework | 61e77eeb61394e8e719e4e06216e55491743652e.json | Fix white spaces | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-handlers.xml | @@ -1,19 +1,19 @@
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:websocket="http://www.springframework.org/schema/websocket"
- xsi:schemaLocation="
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:websock... | true |
Other | spring-projects | spring-framework | ab2526a5868deca9b483f4f90fe443c2370c6655.json | Update support for using "." as path separator
Issue: SPR-11660 | spring-core/src/main/java/org/springframework/util/AntPathMatcher.java | @@ -68,30 +68,35 @@ public class AntPathMatcher implements PathMatcher {
final Map<String, AntPathStringMatcher> stringMatcherCache = new ConcurrentHashMap<String, AntPathStringMatcher>(256);
+ private PathSeparatorPatternCache pathSeparatorPatternCache = new PathSeparatorPatternCache(DEFAULT_PATH_SEPARATOR);
+
+... | true |
Other | spring-projects | spring-framework | ab2526a5868deca9b483f4f90fe443c2370c6655.json | Update support for using "." as path separator
Issue: SPR-11660 | spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java | @@ -607,9 +607,10 @@ public void testCacheSetToFalse() {
}
@Test
- public void noExtensionHandlingWithDotSeparator() {
+ public void testExtensionMappingWithDotPathSeparator() {
pathMatcher.setPathSeparator(".");
- assertEquals("/*.html.hotel.*", pathMatcher.combine("/*.html", "hotel.*"));
+ assertEquals("Ex... | true |
Other | spring-projects | spring-framework | ab2526a5868deca9b483f4f90fe443c2370c6655.json | Update support for using "." as path separator
Issue: SPR-11660 | spring-messaging/src/main/java/org/springframework/messaging/handler/DestinationPatternsMessageCondition.java | @@ -21,6 +21,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
@@ -55,51 +56,38 @@
* @param patterns 0 or more URL patterns; if 0 the condition will match to e... | true |
Other | spring-projects | spring-framework | ab2526a5868deca9b483f4f90fe443c2370c6655.json | Update support for using "." as path separator
Issue: SPR-11660 | spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AbstractMethodMessageHandler.java | @@ -90,27 +90,27 @@
/**
- * Configure one or more prefixes to match to the destinations of handled messages.
- * Messages whose destination does not start with one of the configured prefixes
- * are ignored. When a destination matches one of the configured prefixes, the
- * matching part is removed from desti... | true |
Other | spring-projects | spring-framework | ab2526a5868deca9b483f4f90fe443c2370c6655.json | Update support for using "." as path separator
Issue: SPR-11660 | spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandler.java | @@ -93,7 +93,9 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan
private ConversionService conversionService = new DefaultFormattingConversionService();
- private PathMatcher pathMatcher;
+ private PathMatcher pathMatcher = new AntPathMatcher();
+
+ private boolean slashPathSepar... | true |
Other | spring-projects | spring-framework | ab2526a5868deca9b483f4f90fe443c2370c6655.json | Update support for using "." as path separator
Issue: SPR-11660 | spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandler.java | @@ -51,45 +51,30 @@ public class SimpleBrokerMessageHandler extends AbstractBrokerMessageHandler {
private SubscriptionRegistry subscriptionRegistry;
+ private PathMatcher pathMatcher;
+
private MessageHeaderInitializer headerInitializer;
/**
* Create a SimpleBrokerMessageHandler instance with the give... | true |
Other | spring-projects | spring-framework | ab2526a5868deca9b483f4f90fe443c2370c6655.json | Update support for using "." as path separator
Issue: SPR-11660 | spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractBrokerRegistration.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * 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.
@@ -23,6 +23,7 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | ab2526a5868deca9b483f4f90fe443c2370c6655.json | Update support for using "." as path separator
Issue: SPR-11660 | spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java | @@ -39,9 +39,9 @@
import org.springframework.messaging.support.AbstractSubscribableChannel;
import org.springframework.messaging.support.ExecutorSubscribableChannel;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-import org.springframework.util.AntPathMatcher;
import org.springframework.u... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.