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 | 9023cf6ae0430790fba7738e25bd0c04bf8db4f6.json | Redesign MockMvcHtmlUnitDriverBuilder API
This commit introduces a dedicated build() method in
MockMvcHtmlUnitDriverBuilder to replace createDriver(). In addition,
the configureDriver() method has been renamed to withDelegate() and now
returns the builder for further customization.
This commit also overhauls the Java... | spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilder.java | @@ -85,7 +85,7 @@ public static MockMvcWebClientBuilder webAppContextSetup(WebApplicationContext c
* {@link WebApplicationContext} and {@link MockMvcConfigurer}.
* @param context the {@code WebApplicationContext} to create a {@link MockMvc}
* instance from; never {@code null}
- * @param configurer the MockMvc... | true |
Other | spring-projects | spring-framework | 9023cf6ae0430790fba7738e25bd0c04bf8db4f6.json | Redesign MockMvcHtmlUnitDriverBuilder API
This commit introduces a dedicated build() method in
MockMvcHtmlUnitDriverBuilder to replace createDriver(). In addition,
the configureDriver() method has been renamed to withDelegate() and now
returns the builder for further customization.
This commit also overhauls the Java... | spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilder.java | @@ -20,16 +20,18 @@
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.htmlunit.MockMvcWebConnectionBuilderSupport;
+import org.springframework.test.web.servlet.htmlunit.WebRequestMatcher;
import org.springframework.test.web.servlet.setup.MockMvcConfigurer;
+import org... | true |
Other | spring-projects | spring-framework | 9023cf6ae0430790fba7738e25bd0c04bf8db4f6.json | Redesign MockMvcHtmlUnitDriverBuilder API
This commit introduces a dedicated build() method in
MockMvcHtmlUnitDriverBuilder to replace createDriver(). In addition,
the configureDriver() method has been renamed to withDelegate() and now
returns the builder for further customization.
This commit also overhauls the Java... | spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java | @@ -42,6 +42,7 @@
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
+import static org.springframework.test.web.servlet.htmlunit.webdriver.MockMvcHtmlUnitDriverBuilder.*;
/**
* Integration tests for {@link MockMvcHtmlUnitDriverBuilder}.
@@ -70,54 +71,42 @@ public void setup() {
}
... | true |
Other | spring-projects | spring-framework | 9023cf6ae0430790fba7738e25bd0c04bf8db4f6.json | Redesign MockMvcHtmlUnitDriverBuilder API
This commit introduces a dedicated build() method in
MockMvcHtmlUnitDriverBuilder to replace createDriver(). In addition,
the configureDriver() method has been renamed to withDelegate() and now
returns the builder for further customization.
This commit also overhauls the Java... | src/asciidoc/testing.adoc | @@ -4594,7 +4594,7 @@ WebDriver driver;
public void setup() {
driver = MockMvcHtmlUnitDriverBuilder
.webAppContextSetup(context)
- .createDriver();
+ .build();
}
----
@@ -4818,7 +4818,7 @@ following:
def setup() {
browser.driver = MockMvcHtmlUnitDriverBuilder
.webAppContextSetup(context, springSecurit... | true |
Other | spring-projects | spring-framework | 3b84a7e84d0a48a5efde12b04348d21c29fa1eaf.json | Redesign MockMvcWebClientBuilder API
This commit introduces a dedicated build() method in
MockMvcWebClientBuilder to replace createWebClient(). In addition, the
configureWebClient() method has been renamed to withDelegate() and now
returns the builder for further customization.
This commit also overhauls the construc... | spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilder.java | @@ -24,15 +24,27 @@
import com.gargoylesoftware.htmlunit.WebClient;
/**
- * {@code MockMvcWebClientBuilder} simplifies the creation of a {@link WebClient}
- * that delegates to a {@link MockMvc} instance.
+ * {@code MockMvcWebClientBuilder} simplifies the creation of an HtmlUnit
+ * {@link WebClient} that delegates... | true |
Other | spring-projects | spring-framework | 3b84a7e84d0a48a5efde12b04348d21c29fa1eaf.json | Redesign MockMvcWebClientBuilder API
This commit introduces a dedicated build() method in
MockMvcWebClientBuilder to replace createWebClient(). In addition, the
configureWebClient() method has been renamed to withDelegate() and now
returns the builder for further customization.
This commit also overhauls the construc... | spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java | @@ -18,6 +18,7 @@
import java.io.IOException;
import java.net.URL;
+
import javax.servlet.http.HttpServletRequest;
import org.junit.Before;
@@ -42,22 +43,23 @@
import com.gargoylesoftware.htmlunit.WebRequest;
import com.gargoylesoftware.htmlunit.WebResponse;
-import static org.hamcrest.CoreMatchers.equalTo;... | true |
Other | spring-projects | spring-framework | 3b84a7e84d0a48a5efde12b04348d21c29fa1eaf.json | Redesign MockMvcWebClientBuilder API
This commit introduces a dedicated build() method in
MockMvcWebClientBuilder to replace createWebClient(). In addition, the
configureWebClient() method has been renamed to withDelegate() and now
returns the builder for further customization.
This commit also overhauls the construc... | src/asciidoc/testing.adoc | @@ -4344,7 +4344,7 @@ WebClient webClient;
public void setup() {
webClient = MockMvcWebClientBuilder
.webAppContextSetup(context)
- .createWebClient();
+ .build();
}
----
@@ -4371,8 +4371,8 @@ HtmlPage createMsgFormPage = webClient.getPage("http://localhost/messages/form")
[NOTE]
====
-The the context p... | true |
Other | spring-projects | spring-framework | e998c450e679fb2fb0ccd8c6cbe76b738e0ec196.json | Add Assume PERFORMANCE to needed HtmlUnit Tests
Some of the HtmlUnit Tests required an internet connection. This
caused failures when running offline.
This commit adds Assume PERFORMANCE to those tests so they are
only ran when the PERFORMANCE group is selected.
Issue: SPR-13158 | spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java | @@ -30,6 +30,8 @@
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection.DelegateWebConnection;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.tests.Assume;
+import org.springframework.tests.Tes... | true |
Other | spring-projects | spring-framework | e998c450e679fb2fb0ccd8c6cbe76b738e0ec196.json | Add Assume PERFORMANCE to needed HtmlUnit Tests
Some of the HtmlUnit Tests required an internet connection. This
caused failures when running offline.
This commit adds Assume PERFORMANCE to those tests so they are
only ran when the PERFORMANCE group is selected.
Issue: SPR-13158 | spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java | @@ -31,6 +31,8 @@
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.tests.Assume;
+import org.springframework.tests.TestGroup;
import org.springframework... | true |
Other | spring-projects | spring-framework | e998c450e679fb2fb0ccd8c6cbe76b738e0ec196.json | Add Assume PERFORMANCE to needed HtmlUnit Tests
Some of the HtmlUnit Tests required an internet connection. This
caused failures when running offline.
This commit adds Assume PERFORMANCE to those tests so they are
only ran when the PERFORMANCE group is selected.
Issue: SPR-13158 | spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java | @@ -33,6 +33,8 @@
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.tests.Assume;
+import org.springframework.tests.TestGroup;
import org.springframework... | true |
Other | spring-projects | spring-framework | 14f27bda3708eee64ce21807d4284cdf6ca26566.json | Prefer use of "Java EE" over "J2EE" | spring-jms/src/main/java/org/springframework/jms/connection/TransactionAwareConnectionFactoryProxy.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -39,7 +39,7 @@
/**
* Proxy for a target J... | true |
Other | spring-projects | spring-framework | 14f27bda3708eee64ce21807d4284cdf6ca26566.json | Prefer use of "Java EE" over "J2EE" | spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java | @@ -51,7 +51,7 @@
* domain.
*
* <p>Default settings for JMS Sessions are "not transacted" and "auto-acknowledge".
- * As defined by the J2EE specification, the transaction and acknowledgement
+ * As defined by the Java EE specification, the transaction and acknowledgement
* parameters are ignored when a JMS Ses... | true |
Other | spring-projects | spring-framework | 14f27bda3708eee64ce21807d4284cdf6ca26566.json | Prefer use of "Java EE" over "J2EE" | spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java | @@ -46,20 +46,19 @@
* configured through the {@link #setReceiveTimeout "receiveTimeout"} property.
*
* <p>The underlying mechanism is based on standard JMS MessageConsumer handling,
- * which is perfectly compatible with both native JMS and JMS in a J2EE environment.
- * Neither the JMS {@code MessageConsumer.set... | true |
Other | spring-projects | spring-framework | 14f27bda3708eee64ce21807d4284cdf6ca26566.json | Prefer use of "Java EE" over "J2EE" | spring-jms/src/main/java/org/springframework/jms/support/JmsAccessor.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -79,7 +79,7 @@ public ConnectionFactory getC... | true |
Other | spring-projects | spring-framework | 14f27bda3708eee64ce21807d4284cdf6ca26566.json | Prefer use of "Java EE" over "J2EE" | spring-tx/src/main/java/org/springframework/transaction/TransactionDefinition.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -86,8 +86,8 @@ public interface TransactionD... | true |
Other | spring-projects | spring-framework | 14f27bda3708eee64ce21807d4284cdf6ca26566.json | Prefer use of "Java EE" over "J2EE" | spring-tx/src/main/java/org/springframework/transaction/annotation/Propagation.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -58,21 +58,23 @@ public enum Propagation {
... | true |
Other | spring-projects | spring-framework | 14f27bda3708eee64ce21807d4284cdf6ca26566.json | Prefer use of "Java EE" over "J2EE" | spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -119,7 +119,7 @@ public WebSphereUowTransact... | true |
Other | spring-projects | spring-framework | 40ea9ffd636923275af2788939f12a29459db476.json | Remove unnecessary imports | spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebConnection.java | @@ -25,7 +25,6 @@
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.RequestBuilder;
import org.springframework.test.web.servlet.ResultActions;
-import org.springframework.test.web.servlet.htmlunit.webdriver.WebConnectionHtmlUnitDriver;
import org.springframework.util.A... | true |
Other | spring-projects | spring-framework | 40ea9ffd636923275af2788939f12a29459db476.json | Remove unnecessary imports | spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/webdriver/WebConnectionHtmlUnitDriver.java | @@ -19,7 +19,6 @@
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
-import org.springframework.test.web.servlet.htmlunit.MockMvcWebConnection;
import org.springframework.util.Assert;
import com.gargoylesoftware.htmlunit.BrowserVersion;
@@ -30,8 +29,9 @@
* {@code Web... | true |
Other | spring-projects | spring-framework | b6c0e7cba3de036b96fb84c8893cdd0ac316194e.json | Remove trailing whitespace in Java source code | spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java | @@ -479,7 +479,7 @@ public void patternComparator() {
// longer is better
assertEquals(1, comparator.compare("/hotels", "/hotels2"));
-
+
//SPR-13139
assertEquals(-1, comparator.compare("*", "*/**"));
assertEquals(1, comparator.compare("*/**", "*")); | true |
Other | spring-projects | spring-framework | b6c0e7cba3de036b96fb84c8893cdd0ac316194e.json | Remove trailing whitespace in Java source code | spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java | @@ -2999,7 +2999,7 @@ public void failsWhenSettingContextForExpression_SPR12326() {
context.setVariable("it", person);
expression.setEvaluationContext(context);
assertTrue(expression.getValue(Boolean.class));
- assertTrue(expression.getValue(Boolean.class));
+ assertTrue(expression.getValue(B... | true |
Other | spring-projects | spring-framework | b6c0e7cba3de036b96fb84c8893cdd0ac316194e.json | Remove trailing whitespace in Java source code | spring-web/src/test/java/org/springframework/http/client/OkHttpAsyncClientHttpRequestFactoryTests.java | @@ -24,7 +24,7 @@
* @author Luciano Leggieri
*/
public class OkHttpAsyncClientHttpRequestFactoryTests extends AbstractAsyncHttpRequestFactoryTestCase {
-
+
@Override
protected AsyncClientHttpRequestFactory createRequestFactory() {
return new OkHttpClientHttpRequestFactory(); | true |
Other | spring-projects | spring-framework | b6c0e7cba3de036b96fb84c8893cdd0ac316194e.json | Remove trailing whitespace in Java source code | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java | @@ -781,7 +781,7 @@ public List<ParentClass> handleList() {
return list;
}
}
-
+
private static class EmptyRequestBodyAdvice implements RequestBodyAdvice {
@Override | true |
Other | spring-projects | spring-framework | 26cfe5795fcaf59288a3c0e3ccdbb60751a9dd4b.json | Find @ResponseStatus recursively on getCause()
Issue: SPR-12903 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -61,6 +61,10 @@ protected ModelAndView doRes... | true |
Other | spring-projects | spring-framework | 26cfe5795fcaf59288a3c0e3ccdbb60751a9dd4b.json | Find @ResponseStatus recursively on getCause()
Issue: SPR-12903 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -16,21 +16,23 @@
package org.springframew... | true |
Other | spring-projects | spring-framework | 26cfe5795fcaf59288a3c0e3ccdbb60751a9dd4b.json | Find @ResponseStatus recursively on getCause()
Issue: SPR-12903 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java | @@ -113,6 +113,7 @@
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.... | true |
Other | spring-projects | spring-framework | b18053f93a2f3b01c53843284627a54e751577cf.json | Fix failing test
The onFailure callback and future.get() occur in different threads so
this change adds a latch to ensure we have both before asserting.
Issue: SPR-12887 | spring-web/src/test/java/org/springframework/web/client/AsyncRestTemplateIntegrationTests.java | @@ -20,8 +20,10 @@
import java.nio.charset.Charset;
import java.util.EnumSet;
import java.util.Set;
+import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
import org.junit.Before;
import org.junit.T... | false |
Other | spring-projects | spring-framework | 8ff7cc73bcffca02117aab069017e857b17d59f3.json | Try defaulContentType for application/octet-stream
AbstractHttpMessageConverter now tries to call getDefaultContentType
with the actual value to be converted to see if that will result in
a more concrete mediat type than application/octet-stream.
Issue: SPR-12894 | spring-web/src/main/java/org/springframework/http/converter/AbstractHttpMessageConverter.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -174,6 +174,10 @@ public final void write(fi... | true |
Other | spring-projects | spring-framework | 8ff7cc73bcffca02117aab069017e857b17d59f3.json | Try defaulContentType for application/octet-stream
AbstractHttpMessageConverter now tries to call getDefaultContentType
with the actual value to be converted to see if that will result in
a more concrete mediat type than application/octet-stream.
Issue: SPR-12894 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java | @@ -30,6 +30,9 @@
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.target.SingletonTargetSource;
import org.springframework.core.MethodParameter;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.FileSystemResource;
+import org.springframe... | true |
Other | spring-projects | spring-framework | 463878a03fdc20f73fae62d7ed0e9c21e23772e2.json | Improve RedirectAttributes reference docs
The use of RedirectAttributes was documented in four places in the
reference documentation. This commit merges some of the places and links
properly between them.
Issue: SPR-12759 | src/asciidoc/web-mvc.adoc | @@ -1169,8 +1169,8 @@ multiple requests are allowed to access a session concurrently.
* `org.springframework.web.servlet.mvc.support.RedirectAttributes` to specify the exact
set of attributes to use in case of a redirect and also to add flash attributes
(attributes stored temporarily on the server-side to make t... | false |
Other | spring-projects | spring-framework | e5b505224b77bb2428ab9ca85e894a1ba51f8994.json | Improve exception message
Issue: SPR-12898 | spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java | @@ -184,7 +184,8 @@ public void afterSingletonsInstantiated() {
}
catch (NoUniqueBeanDefinitionException ex) {
throw new IllegalStateException("No CacheResolver specified, and no unique bean of type " +
- "CacheManager found. Mark one as primary or declare a specific CacheManager to use.");
+ "Ca... | false |
Other | spring-projects | spring-framework | 063ef240c185fe6ba2ed39ef2fc6767c7a8dd900.json | Support static fields in ReflectionTestUtils
Prior to this commit it was possible to set or get a static field using
ReflectionTestUtils but only if an instance of the target class was
available.
This commit introduces dedicated support for setting and getting static
fields in ReflectionTestUtils when only the target... | spring-test/src/main/java/org/springframework/test/util/ReflectionTestUtils.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -51,6 +51,10 @@
* methods.</li>
* </ul>
... | true |
Other | spring-projects | spring-framework | 063ef240c185fe6ba2ed39ef2fc6767c7a8dd900.json | Support static fields in ReflectionTestUtils
Prior to this commit it was possible to set or get a static field using
ReflectionTestUtils but only if an instance of the target class was
available.
This commit introduces dedicated support for setting and getting static
fields in ReflectionTestUtils when only the target... | spring-test/src/test/java/org/springframework/test/util/ReflectionTestUtilsTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -16,13 +16,18 @@
package org.springframew... | true |
Other | spring-projects | spring-framework | 063ef240c185fe6ba2ed39ef2fc6767c7a8dd900.json | Support static fields in ReflectionTestUtils
Prior to this commit it was possible to set or get a static field using
ReflectionTestUtils but only if an instance of the target class was
available.
This commit introduces dedicated support for setting and getting static
fields in ReflectionTestUtils when only the target... | spring-test/src/test/java/org/springframework/test/util/subpackage/StaticFields.java | @@ -0,0 +1,41 @@
+/*
+ * Copyright 2002-2015 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 | 0b8554f94a73b1620d8c34d1a68b3eb8e56d482a.json | Leave query un-encoded in MockMvc request builder
Issue: SPR-12880 | spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java | @@ -581,8 +581,7 @@ public final MockHttpServletRequest buildRequest(ServletContext servletContext)
try {
if (this.uriComponents.getQuery() != null) {
- String query = UriUtils.decode(this.uriComponents.getQuery(), "UTF-8");
- request.setQueryString(query);
+ request.setQueryString(this.uriComponents.... | true |
Other | spring-projects | spring-framework | 0b8554f94a73b1620d8c34d1a68b3eb8e56d482a.json | Leave query un-encoded in MockMvc request builder
Issue: SPR-12880 | spring-test/src/test/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilderTests.java | @@ -210,7 +210,7 @@ public void requestParameterFromQueryList() {
MockHttpServletRequest request = this.builder.buildRequest(this.servletContext);
- assertEquals("foo[0]=bar&foo[1]=baz", request.getQueryString());
+ assertEquals("foo%5B0%5D=bar&foo%5B1%5D=baz", request.getQueryString());
assertEquals("bar",... | true |
Other | spring-projects | spring-framework | 13403d51e589a3612f8359c8f3e4d2c21947af81.json | Improve error message for missing request body
Issue: SPR-12888 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java | @@ -147,7 +147,8 @@ protected <T> Object readWithMessageConverters(NativeWebRequest webRequest, Meth
Object arg = readWithMessageConverters(inputMessage, methodParam, paramType);
if (arg == null) {
if (methodParam.getParameterAnnotation(RequestBody.class).required()) {
- throw new HttpMessageNotReadableExc... | false |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageHeaderAccessor.java | @@ -51,8 +51,6 @@ public class SimpMessageHeaderAccessor extends NativeMessageHeaderAccessor {
// SiMP header names
- public static final String CONNECT_MESSAGE_HEADER = "simpConnectMessage";
-
public static final String DESTINATION_HEADER = "simpDestination";
public static final String MESSAGE_TYPE_HEADER ... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageType.java | @@ -29,14 +29,14 @@ public enum SimpMessageType {
CONNECT_ACK,
- HEARTBEAT,
-
MESSAGE,
SUBSCRIBE,
UNSUBSCRIBE,
+ HEARTBEAT,
+
DISCONNECT,
DISCONNECT_ACK, | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandler.java | @@ -16,7 +16,11 @@
package org.springframework.messaging.simp.broker;
+import java.security.Principal;
import java.util.Collection;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ScheduledFuture;
import org.springframework.messaging.Message;
import org.spri... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-messaging/src/main/java/org/springframework/messaging/simp/config/SimpleBrokerRegistration.java | @@ -19,6 +19,7 @@
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler;
+import org.springframework.scheduling.TaskScheduler;
/**
* Registration class for configuring a {@link Si... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/DefaultStompSession.java | @@ -389,7 +389,7 @@ else if (logger.isDebugEnabled()) {
}
}
else if (StompCommand.CONNECTED.equals(command)) {
- initHeartbeats(stompHeaders);
+ initHeartbeatTasks(stompHeaders);
this.sessionFuture.set(this);
this.sessionHandler.afterConnected(this, stompHeaders);
}
@@ -420,20 +... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-messaging/src/test/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandlerTests.java | @@ -16,33 +16,40 @@
package org.springframework.messaging.simp.broker;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
+import static org.junit.Assert.*;
+import static org.mockito.Matcher... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java | @@ -320,6 +320,14 @@ private RootBeanDefinition registerMessageBroker(Element messageBrokerElement, R
String pathMatcherRef = messageBrokerElement.getAttribute("path-matcher");
brokerDef.getPropertyValues().add("pathMatcher", new RuntimeBeanReference(pathMatcherRef));
}
+ if (simpleBrokerElem.hasAttribu... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java | @@ -34,6 +34,7 @@
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.MessageHeaders;
import org.springframework.messaging.simp.SimpAttributes;
import org.springfr... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-websocket/src/main/resources/META-INF/spring.schemas | @@ -1,3 +1,3 @@
http\://www.springframework.org/schema/websocket/spring-websocket-4.0.xsd=org/springframework/web/socket/config/spring-websocket-4.0.xsd
http\://www.springframework.org/schema/websocket/spring-websocket-4.1.xsd=org/springframework/web/socket/config/spring-websocket-4.1.xsd
-http\://www.springframework... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.2.xsd | @@ -0,0 +1,896 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ ~ 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
+ ~
+ ... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -18,6 +18,7 @@
import java.util.ArrayList... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupportTests.java | @@ -17,6 +17,7 @@
package org.springframework.web.socket.config.annotation;
import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
import java.util.ArrayList;
import java.util.List;
@@ -37,13 +38,15 @@
import org.springframework.messaging.simp.SimpMessageType;
import org.springframework.messa... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java | @@ -16,21 +16,12 @@
package org.springframework.web.socket.messaging;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static ... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-websocket/src/test/java/org/springframework/web/socket/messaging/WebSocketStompClientIntegrationTests.java | @@ -175,6 +175,14 @@ public void handleFrame(StompHeaders headers, Object payload) {
received.add((String) payload);
}
});
+ try {
+ // Delay send since server processes concurrently
+ // Ideally order should be preserved or receipts supported (simple broker)
+ Thread.sleep(500);
+ }
+ cat... | true |
Other | spring-projects | spring-framework | de9675bf5a8f4b2e24497b05ce851e48942883ff.json | Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954 | spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-broker-simple.xml | @@ -32,7 +32,7 @@
<websocket:sockjs/>
</websocket:stomp-endpoint>
- <websocket:simple-broker prefix="/topic, /queue"/>
+ <websocket:simple-broker prefix="/topic, /queue" heartbeat="15000,15000" scheduler="scheduler" />
</websocket:message-broker>
@@ -42,5 +42,6 @@
<bean id="myHandler" class="org.sp... | true |
Other | spring-projects | spring-framework | eb8c253499af15ed247906d53a8d64f5b91270e8.json | Fix failing tests | spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java | @@ -17,11 +17,11 @@
package org.springframework.web.cors;
import static org.junit.Assert.*;
+
import org.junit.Test;
import org.springframework.http.HttpHeaders;
import org.springframework.mock.web.test.MockHttpServletRequest;
-import org.springframework.mock.web.test.MockHttpServletResponse;
/**
* Test c... | true |
Other | spring-projects | spring-framework | eb8c253499af15ed247906d53a8d64f5b91270e8.json | Fix failing tests | spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java | @@ -51,12 +51,10 @@ public void setup() {
this.processor = new DefaultCorsProcessor();
}
- @Test
+ @Test(expected = IllegalArgumentException.class)
public void actualRequestWithoutOriginHeader() throws Exception {
this.request.setMethod(HttpMethod.GET.name());
this.processor.processActualRequest(this.con... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-web/src/main/java/org/springframework/web/bind/annotation/CrossOrigin.java | @@ -0,0 +1,82 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java | @@ -0,0 +1,229 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-web/src/main/java/org/springframework/web/cors/CorsConfigurationSource.java | @@ -0,0 +1,35 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-web/src/main/java/org/springframework/web/cors/CorsProcessor.java | @@ -0,0 +1,50 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-web/src/main/java/org/springframework/web/cors/CorsUtils.java | @@ -0,0 +1,110 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java | @@ -0,0 +1,217 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java | @@ -0,0 +1,82 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java | @@ -0,0 +1,302 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java | @@ -903,7 +903,7 @@ protected final void doDelete(HttpServletRequest request, HttpServletResponse re
protected void doOptions(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
- if (this.dispatchOptionsRequest) {
+ if (this.dispatchOptionsRequest || request.getHe... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -16,14 +16,20 @@
package org.springframew... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java | @@ -35,6 +35,8 @@
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.util.ReflectionUtils.MethodFilter;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.CorsUtils;
import org.springframework.web.m... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -19,6 +19,8 @@
import javax.servlet.http.Ht... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -24,13 +24,19 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java | @@ -38,7 +38,9 @@
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpRange;
import org.springframework.http.MediaType;
+import org.springframework.web.cors.CorsConfiguration;
import org.springframework.http.server.ServletServerHttpRequest;
+import org.springframework.web.cors.CorsConfi... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-webmvc/src/test/java/org/springframework/web/servlet/handler/CorsAbstractHandlerMappingTests.java | @@ -0,0 +1,168 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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,10 @@
import org.junit.Test;
... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java | @@ -0,0 +1,284 @@
+/*
+ * Copyright 2002-2015 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 | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java | @@ -27,10 +27,11 @@
import java.util.Random;
import java.util.concurrent.TimeUnit;
+import javax.servlet.http.HttpServletRequest;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
imp... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/SockJsHttpRequestHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -27,6 +27,8 @@
import org.springframework.h... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java | @@ -56,6 +56,7 @@
*
* @author Rossen Stoyanchev
* @author Juergen Hoeller
+ * @author Sebastien Deleuze
* @since 4.0
*/
public class TransportHandlingSockJsService extends AbstractSockJsService implements SockJsServiceConfig {
@@ -208,27 +209,27 @@ protected void handleTransportRequest(ServerHttpRequest requ... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-websocket/src/test/java/org/springframework/web/socket/AbstractHttpRequestTests.java | @@ -18,7 +18,6 @@
import org.junit.Before;
-import org.springframework.http.HttpHeaders;
import org.springframework.http.server.ServerHttpAsyncRequestControl;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
@@ -55,10 +54,6 @@ protected void se... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-websocket/src/test/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptorTests.java | @@ -26,6 +26,7 @@
import org.junit.Test;
import org.mockito.Mockito;
+import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.web.socket.AbstractHttpRequestTests;
import org.springframework.web.socket.WebSocketHandler;
@@ -61,7 +62,7 @@ public void vali... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-websocket/src/test/java/org/springframework/web/socket/sockjs/support/SockJsServiceTests.java | @@ -26,12 +26,14 @@
import org.junit.Before;
import org.junit.Test;
+import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.http.serve... | true |
Other | spring-projects | spring-framework | b0e1e66b7fd54a3f937859f84fff966bff0be424.json | Add CORS support
This commit introduces support for CORS in Spring Framework.
Cross-origin resource sharing (CORS) is a mechanism that allows
many resources (e.g. fonts, JavaScript, etc.) on a web page to
be requested from another domain outside the domain from which
the resource originated. It is defined by the CORS... | spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java | @@ -26,7 +26,9 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import org.springframework.http.HttpHeaders;
import org.springframework.scheduling.TaskScheduler;
+import org.springframework.web.cors.CorsUtils;
import org.springframework.web.socket.AbstractHttpRequestTests;
import org.springfra... | true |
Other | spring-projects | spring-framework | 3a8a28beecc7aa0a4df6f47072fe806dd00e5cfc.json | Consolidate partialPaths under FullPathComposite | spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java | @@ -642,13 +642,49 @@ static final class FullPathComponent implements PathComponent {
public FullPathComponent(String path) {
- this.partialPaths = PartialPath.parse(path);
+ this.partialPaths = Collections.unmodifiableList(initPartialPaths(path));
this.path = path;
}
private FullPathComponent(Li... | true |
Other | spring-projects | spring-framework | 3a8a28beecc7aa0a4df6f47072fe806dd00e5cfc.json | Consolidate partialPaths under FullPathComposite | spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java | @@ -16,20 +16,21 @@
package org.springframework.web.util;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+import static org.springframework.web.util.UriComponentsBuilder.*;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
... | true |
Other | spring-projects | spring-framework | 36ed4df59df03082b510841e55511d02424b7e56.json | Improve empty request body handling
The check for an empty request body InputStream is now in the base
class AbstractMessageConverterMethodArgumentResolver shared for
all arguments that involve reading with an HttpMessageConverter --
@RequestBody, @RequestPart, and HttpEntity.
When an empty body is detected any confi... | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodArgumentResolver.java | @@ -17,6 +17,8 @@
package org.springframework.web.servlet.mvc.method.annotation;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.PushbackInputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -33,6 +35,7 @@
import org.springfra... | true |
Other | spring-projects | spring-framework | 36ed4df59df03082b510841e55511d02424b7e56.json | Improve empty request body handling
The check for an empty request body InputStream is now in the base
class AbstractMessageConverterMethodArgumentResolver shared for
all arguments that involve reading with an HttpMessageConverter --
@RequestBody, @RequestPart, and HttpEntity.
When an empty body is detected any confi... | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessor.java | @@ -19,12 +19,14 @@
import java.io.IOException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.net.URI;
import java.util.List;
import org.springframework.core.MethodParameter;
import org.springframework.core.ResolvableType;
import org.springframework.http.HttpEntity;
i... | true |
Other | spring-projects | spring-framework | 36ed4df59df03082b510841e55511d02424b7e56.json | Improve empty request body handling
The check for an empty request body InputStream is now in the base
class AbstractMessageConverterMethodArgumentResolver shared for
all arguments that involve reading with an HttpMessageConverter --
@RequestBody, @RequestPart, and HttpEntity.
When an empty body is detected any confi... | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java | @@ -17,8 +17,6 @@
package org.springframework.web.servlet.mvc.method.annotation;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.PushbackInputStream;
import java.lang.reflect.Type;
import java.util.List;
@@ -146,43 +144,14 @@ protected <T> Object readWithMessageConverters(NativeWebReque... | true |
Other | spring-projects | spring-framework | 36ed4df59df03082b510841e55511d02424b7e56.json | Improve empty request body handling
The check for an empty request body InputStream is now in the base
class AbstractMessageConverterMethodArgumentResolver shared for
all arguments that involve reading with an HttpMessageConverter --
@RequestBody, @RequestPart, and HttpEntity.
When an empty body is detected any confi... | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java | @@ -16,14 +16,19 @@
package org.springframework.web.servlet.mvc.method.annotation;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.any;
+import static org.mockito.BDDMockito.*;
+import static org.mockito.BDDMockito.isA;
+import static org.mockito.Matchers.eq;
+import static org.springframe... | true |
Other | spring-projects | spring-framework | 36ed4df59df03082b510841e55511d02424b7e56.json | Improve empty request body handling
The check for an empty request body InputStream is now in the base
class AbstractMessageConverterMethodArgumentResolver shared for
all arguments that involve reading with an HttpMessageConverter --
@RequestBody, @RequestPart, and HttpEntity.
When an empty body is detected any confi... | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -16,9 +16,12 @@
package org.springframewo... | true |
Other | spring-projects | spring-framework | 36ed4df59df03082b510841e55511d02424b7e56.json | Improve empty request body handling
The check for an empty request body InputStream is now in the base
class AbstractMessageConverterMethodArgumentResolver shared for
all arguments that involve reading with an HttpMessageConverter --
@RequestBody, @RequestPart, and HttpEntity.
When an empty body is detected any confi... | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartIntegrationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -16,8 +16,13 @@
package org.springframewo... | true |
Other | spring-projects | spring-framework | 36ed4df59df03082b510841e55511d02424b7e56.json | Improve empty request body handling
The check for an empty request body InputStream is now in the base
class AbstractMessageConverterMethodArgumentResolver shared for
all arguments that involve reading with an HttpMessageConverter --
@RequestBody, @RequestPart, and HttpEntity.
When an empty body is detected any confi... | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java | @@ -16,11 +16,16 @@
package org.springframework.web.servlet.mvc.method.annotation;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
import java.lang.reflect.Method;
+import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
impo... | true |
Other | spring-projects | spring-framework | 36ed4df59df03082b510841e55511d02424b7e56.json | Improve empty request body handling
The check for an empty request body InputStream is now in the base
class AbstractMessageConverterMethodArgumentResolver shared for
all arguments that involve reading with an HttpMessageConverter --
@RequestBody, @RequestPart, and HttpEntity.
When an empty body is detected any confi... | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorMockTests.java | @@ -16,12 +16,15 @@
package org.springframework.web.servlet.mvc.method.annotation;
-import java.io.IOException;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
import java.lang.reflect.Method;
import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.Collections;
... | true |
Other | spring-projects | spring-framework | 36ed4df59df03082b510841e55511d02424b7e56.json | Improve empty request body handling
The check for an empty request body InputStream is now in the base
class AbstractMessageConverterMethodArgumentResolver shared for
all arguments that involve reading with an HttpMessageConverter --
@RequestBody, @RequestPart, and HttpEntity.
When an empty body is detected any confi... | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java | @@ -18,6 +18,7 @@
import java.io.Serializable;
import java.lang.reflect.Method;
+import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -29,6 +30,7 @@
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.target.SingletonTar... | true |
Other | spring-projects | spring-framework | 73d6d30951cb145bbd6b2e2fcdc0388019b15ae9.json | Add flag whether to create HTTP session
Issue: SPR-12840 | spring-websocket/src/main/java/org/springframework/web/socket/server/support/HttpSessionHandshakeInterceptor.java | @@ -54,6 +54,8 @@ public class HttpSessionHandshakeInterceptor implements HandshakeInterceptor {
private boolean copyHttpSessionId = true;
+ private boolean createSession;
+
/**
* Default constructor for copying all HTTP session attributes and the HTTP
@@ -121,6 +123,22 @@ public boolean isCopyHttpSessionI... | false |
Other | spring-projects | spring-framework | 891d41c005d69f9016ccc35a52dc2e99c9da34a0.json | Fix typo in Javadoc | spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java | @@ -242,13 +242,12 @@ public void setMaxAge(Long maxAge) {
}
/**
- * Return the configure maxAge value, possibly {@code null}.
+ * Return the configured maxAge value, possibly {@code null}.
*/
public Long getMaxAge() {
return maxAge;
}
-
/**
* Check the origin of the request against the configu... | false |
Other | spring-projects | spring-framework | 7b10dc6e93b714f9469399d6dbe0c7cc092f54af.json | Fix typo in Javadoc | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeadersMethodArgumentResolver.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2015 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,7 +22,6 @@
import org.springframework.c... | false |
Other | spring-projects | spring-framework | 60a5ec87d03e4dea9a1a3550bec06797c889e66f.json | Introduce alias for 'value' attribute in @Header
This commit introduces 'name' as an alias for 'value' in @Header.
Issue: SPR-11393 | spring-jms/src/test/java/org/springframework/jms/config/MethodJmsListenerEndpointTests.java | @@ -163,6 +163,17 @@ public void resolveCustomHeaderNameAndPayload() throws JMSException {
assertDefaultListenerMethodInvocation();
}
+ @Test
+ public void resolveCustomHeaderNameAndPayloadWithHeaderNameSet() throws JMSException {
+ MessagingMessageListenerAdapter listener = createDefaultInstance(String.class, ... | true |
Other | spring-projects | spring-framework | 60a5ec87d03e4dea9a1a3550bec06797c889e66f.json | Introduce alias for 'value' attribute in @Header
This commit introduces 'name' as an alias for 'value' in @Header.
Issue: SPR-11393 | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Header.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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,10 +22,13 @@
import java.lang.annotatio... | true |
Other | spring-projects | spring-framework | 60a5ec87d03e4dea9a1a3550bec06797c889e66f.json | Introduce alias for 'value' attribute in @Header
This commit introduces 'name' as an alias for 'value' in @Header.
Issue: SPR-11393 | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeaderMethodArgumentResolver.java | @@ -104,7 +104,7 @@ protected void handleMissingValue(String headerName, MethodParameter parameter,
private static class HeaderNamedValueInfo extends NamedValueInfo {
private HeaderNamedValueInfo(Header annotation) {
- super(annotation.value(), annotation.required(), annotation.defaultValue());
+ super(annot... | true |
Other | spring-projects | spring-framework | 60a5ec87d03e4dea9a1a3550bec06797c889e66f.json | Introduce alias for 'value' attribute in @Header
This commit introduces 'name' as an alias for 'value' in @Header.
Issue: SPR-11393 | spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/HeaderMethodArgumentResolverTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -139,8 +139,8 @@ public void resolveDefaultV... | true |
Other | spring-projects | spring-framework | 60a5ec87d03e4dea9a1a3550bec06797c889e66f.json | Introduce alias for 'value' attribute in @Header
This commit introduces 'name' as an alias for 'value' in @Header.
Issue: SPR-11393 | spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandlerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -371,7 +371,7 @@ public void headers(@Header... | true |
Other | spring-projects | spring-framework | 250787a35a2422c0bc12b43232d89df75ca8b4a3.json | Introduce alias for 'value' attribute in @Payload
This commit introduces 'expression' as an alias for 'value' in @Payload.
Issue: SPR-11393 | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 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,6 +22,7 @@
import java.lang.annotation.... | true |
Other | spring-projects | spring-framework | 250787a35a2422c0bc12b43232d89df75ca8b4a3.json | Introduce alias for 'value' attribute in @Payload
This commit introduces 'expression' as an alias for 'value' in @Payload.
Issue: SPR-11393 | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/PayloadArgumentResolver.java | @@ -87,7 +87,7 @@ public boolean supportsParameter(MethodParameter parameter) {
@Override
public Object resolveArgument(MethodParameter param, Message<?> message) throws Exception {
Payload ann = param.getParameterAnnotation(Payload.class);
- if (ann != null && StringUtils.hasText(ann.value())) {
+ if (ann != ... | true |
Other | spring-projects | spring-framework | 9f717871e6aafaa0bc53762622b21cacdfff5584.json | Introduce getAnnotation() in AnnotatedElementUtils
This commit introduces a "synthesized annotation" alternative to
getAnnotationAttributes() in AnnotatedElementUtils, analogous to the
recently introduced findAnnotation() methods.
Issue: SPR-13082 | spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java | @@ -218,6 +218,32 @@ public Boolean process(AnnotatedElement annotatedElement, Annotation annotation,
}));
}
+ /**
+ * Get the first annotation of the specified {@code annotationType} within
+ * the annotation hierarchy <em>above</em> the supplied {@code element},
+ * merge that annotation's attributes with <... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.