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 | c19b2851f190d192b97ce1131e2db49636811578.json | Ignore null Locale in MockHttpServletResponse
Prior to this commit, calls to setLocale() MockHttpServletResponse
would result in a NullPointerException if the supplied Locale was null.
Although the Javadoc for setLocale(Locale) and addHeader(String, String)
in javax.servlet.ServletResponse does not specify how a null... | spring-test/src/test/java/org/springframework/mock/web/MockHttpServletResponseTests.java | @@ -85,6 +85,13 @@ void setHeaderWithNullValue(String headerName) {
assertThat(response.containsHeader(headerName)).isFalse();
}
+ @Test // gh-26493
+ void setLocaleWithNullValue() {
+ assertThat(response.getLocale()).isEqualTo(Locale.getDefault());
+ response.setLocale(null);
+ assertThat(response.getLocale... | true |
Other | spring-projects | spring-framework | c19b2851f190d192b97ce1131e2db49636811578.json | Ignore null Locale in MockHttpServletResponse
Prior to this commit, calls to setLocale() MockHttpServletResponse
would result in a NullPointerException if the supplied Locale was null.
Although the Javadoc for setLocale(Locale) and addHeader(String, String)
in javax.servlet.ServletResponse does not specify how a null... | spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java | @@ -344,6 +344,9 @@ public void reset() {
@Override
public void setLocale(Locale locale) {
+ if (locale == null) {
+ return;
+ }
this.locale = locale;
doAddHeaderValue(HttpHeaders.CONTENT_LANGUAGE, locale.toLanguageTag(), true);
} | true |
Other | spring-projects | spring-framework | c82a4450949287c7d426aa53fe198de2968be312.json | Fix Javadoc in StandardServletAsyncWebRequest | spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java | @@ -36,7 +36,7 @@
*
* <p>The servlet and all filters involved in an async request must have async
* support enabled using the Servlet API or by adding an
- * <code><async-supported>true</async-supported></code> element to servlet and filter
+ * <code><async-supported>true</async-supported></co... | false |
Other | spring-projects | spring-framework | 0ff50d6d9e8857063d36d590cf67bb9ccf69d5ec.json | Improve Javadoc of ServerHttpRequest#getPath
Closes gh-26469 | spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpRequest.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -48,9 +48,14 @@ public interface ServerHttpR... | false |
Other | spring-projects | spring-framework | c5284009a11e87f7001f4c137b7d5313ec1c842c.json | Fix UriComponentsBuilder examples in ref docs
Closes gh-26453 | spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 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,27 @@
*/
class UriComponentsBui... | true |
Other | spring-projects | spring-framework | c5284009a11e87f7001f4c137b7d5313ec1c842c.json | Fix UriComponentsBuilder examples in ref docs
Closes gh-26453 | src/docs/asciidoc/web/web-uris.adoc | @@ -82,7 +82,7 @@ as the following example shows:
.build("Westin", "123")
----
-You shorter it further still with a full URI template, as the following example shows:
+You can shorten it further still with a full URI template, as the following example shows:
[source,java,indent=0,subs="verbatim,quotes",role="... | true |
Other | spring-projects | spring-framework | 5e561623944665f282f5549e3c21b5c1261d7359.json | Fix Checkstyle violation
The @since tag must come before @see tags.
See gh-26450 | spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java | @@ -57,8 +57,8 @@ public static boolean sameResourceFactory(ResourceTransactionManager tm, Object
/**
* Unwrap the given resource handle if necessary; otherwise return
* the given handle as-is.
- * @see org.springframework.core.InfrastructureProxy#getWrappedObject()
* @since 5.3.4
+ * @see org.springframew... | false |
Other | spring-projects | spring-framework | ea9b8c1d0f273cc4cadd39fc2a4e24780c7857fb.json | Upgrade Dokka to 1.6.0
Closes gh-27815 | build.gradle | @@ -2,7 +2,7 @@ plugins {
id 'io.spring.dependency-management' version '1.0.11.RELEASE' apply false
id 'io.spring.nohttp' version '0.0.10'
id "io.freefair.aspectj" version '6.3.0' apply false
- id 'org.jetbrains.dokka' version '1.5.0' apply false
+ id 'org.jetbrains.dokka' version '1.6.0' apply false
id 'org.je... | false |
Other | spring-projects | spring-framework | 1af21bb4513e27add1b32a024fd10e9e69253776.json | Declare serialVersionUID on DefaultAopProxyFactory
Closes gh-27784 | spring-aop/src/main/java/org/springframework/aop/framework/DefaultAopProxyFactory.java | @@ -45,9 +45,10 @@
* @see AdvisedSupport#setProxyTargetClass
* @see AdvisedSupport#setInterfaces
*/
-@SuppressWarnings("serial")
public class DefaultAopProxyFactory implements AopProxyFactory, Serializable {
+ private static final long serialVersionUID = 7930414337282325166L;
+
@Override
public AopProxy ... | false |
Other | spring-projects | spring-framework | ac581bed92181ce8ddfe629e94629a52e3dc972a.json | Avoid NPE against null value from toString call
Closes gh-27782 | spring-core/src/main/java/org/springframework/core/log/LogFormatUtils.java | @@ -22,6 +22,7 @@
import org.apache.commons.logging.Log;
import org.springframework.lang.Nullable;
+import org.springframework.util.ObjectUtils;
/**
* Utility methods for formatting and logging messages.
@@ -71,10 +72,10 @@ public static String formatValue(
}
String result;
try {
- result = value.to... | false |
Other | spring-projects | spring-framework | b06d267232f3951e4d4bdbfbb04c4ce1d83f3b8c.json | Remove references to AsyncConfigurerSupport
Closes gh-27812 | spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncConfigurer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -28,19 +28,13 @@
* {@link AsyncUncaughtExc... | true |
Other | spring-projects | spring-framework | b06d267232f3951e4d4bdbfbb04c4ce1d83f3b8c.json | Remove references to AsyncConfigurerSupport
Closes gh-27812 | spring-context/src/test/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessorTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -218,8 +218,8 @@ public void handleException... | true |
Other | spring-projects | spring-framework | b06d267232f3951e4d4bdbfbb04c4ce1d83f3b8c.json | Remove references to AsyncConfigurerSupport
Closes gh-27812 | spring-test/src/test/java/org/springframework/test/context/event/EventPublishingTestExecutionListenerIntegrationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -31,7 +31,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context-support/src/main/java/org/springframework/cache/jcache/config/JCacheConfigurer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -26,8 +26,7 @@
* <p>To be implemented by c... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -26,7 +26,7 @@
import org.junit.jupiter.api... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -180,7 +180,7 @@ public CacheResolver except... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheErrorHandlerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheKeyGeneratorTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -26,8 +26,7 @@
* Interface to be implement... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context/src/test/java/org/springframework/cache/CacheReproTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -28,7 +28,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -26,7 +26,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java | @@ -22,7 +22,7 @@
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.NoUniqueBeanDefinitionException;
import org.springframework.cache.CacheManager;
-import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.cache.a... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context/src/test/java/org/springframework/cache/config/ExpressionCachingIntegrationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2021 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,7 +20,7 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context/src/test/java/org/springframework/cache/interceptor/CacheErrorHandlerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -28,7 +28,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 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,7 +27,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -29,7 +29,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 8422d9d22f4156831a92b5e01950306880135c0f.json | Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.
Closes gh-27811 | spring-context/src/test/java/org/springframework/cache/interceptor/CacheSyncFailureTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -26,7 +26,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 86eda279c82b79c7888558e7a2524db44c7ee108.json | Support SQUARE brackets [] around NAMED parameter | spring-r2dbc/src/main/java/org/springframework/r2dbc/core/NamedParameterUtils.java | @@ -48,6 +48,7 @@
* @author Thomas Risberg
* @author Juergen Hoeller
* @author Mark Paluch
+ * @author Anton Naydenov
* @since 5.3
*/
abstract class NamedParameterUtils {
@@ -66,7 +67,7 @@ abstract class NamedParameterUtils {
* Set of characters that qualify as parameter separators,
* indicating that a... | true |
Other | spring-projects | spring-framework | 86eda279c82b79c7888558e7a2524db44c7ee108.json | Support SQUARE brackets [] around NAMED parameter | spring-r2dbc/src/test/java/org/springframework/r2dbc/core/NamedParameterUtilsUnitTests.java | @@ -38,6 +38,7 @@
*
* @author Mark Paluch
* @author Jens Schauder
+ * @author Anton Naydenov
*/
public class NamedParameterUtilsUnitTests {
@@ -274,6 +275,18 @@ public void parseSqlStatementWithQuotesAndCommentAfter() {
assertThat(psql2.getParameterNames()).containsExactly("xxx");
}
+ @Test public voi... | true |
Other | spring-projects | spring-framework | ba468a731fc49a383021d3243e6934d29aa1a802.json | Remove JamonPerformanceMonitorInterceptor support
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.
Closes gh-27786 | build.gradle | @@ -112,41 +112,38 @@ configure(allprojects) { project ->
dependency "org.quartz-scheduler:quartz:2.3.2"
dependency "org.ehcache:jcache:1.0.1"
dependency "org.ehcache:ehcache:3.4.0"
- dependency "org.hibernate:hibernate-core-jakarta:5.6.1.Final"
+ dependency "org.hibernate:hibernate-core-jakarta:5.6.2.F... | true |
Other | spring-projects | spring-framework | ba468a731fc49a383021d3243e6934d29aa1a802.json | Remove JamonPerformanceMonitorInterceptor support
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.
Closes gh-27786 | spring-aop/spring-aop.gradle | @@ -5,7 +5,6 @@ dependencies {
api(project(":spring-core"))
optional("org.aspectj:aspectjweaver")
optional("org.apache.commons:commons-pool2")
- optional("com.jamonapi:jamon")
testImplementation(testFixtures(project(":spring-beans")))
testImplementation(testFixtures(project(":spring-core")))
testFixturesImp... | true |
Other | spring-projects | spring-framework | ba468a731fc49a383021d3243e6934d29aa1a802.json | Remove JamonPerformanceMonitorInterceptor support
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.
Closes gh-27786 | spring-aop/src/main/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptor.java | @@ -1,144 +0,0 @@
-/*
- * Copyright 2002-2017 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
- *
- * https://www.apache.org/licenses/LICENSE-2.0
... | true |
Other | spring-projects | spring-framework | ba468a731fc49a383021d3243e6934d29aa1a802.json | Remove JamonPerformanceMonitorInterceptor support
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.
Closes gh-27786 | spring-aop/src/main/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptor.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -31,7 +31,6 @@
* @author Dmitriy Kopylenko... | true |
Other | spring-projects | spring-framework | ba468a731fc49a383021d3243e6934d29aa1a802.json | Remove JamonPerformanceMonitorInterceptor support
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.
Closes gh-27786 | spring-aop/src/test/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptorTests.java | @@ -1,79 +0,0 @@
-/*
- * Copyright 2002-2019 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
-... | true |
Other | spring-projects | spring-framework | ba468a731fc49a383021d3243e6934d29aa1a802.json | Remove JamonPerformanceMonitorInterceptor support
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.
Closes gh-27786 | spring-web/spring-web.gradle | @@ -35,9 +35,8 @@ dependencies {
optional("org.eclipse.jetty:jetty-reactive-httpclient")
optional('org.apache.httpcomponents.client5:httpclient5')
optional('org.apache.httpcomponents.core5:httpcore5-reactive')
- optional("com.squareup.okhttp3:okhttp")
optional("org.apache.httpcomponents:httpclient")
- optional(... | true |
Other | spring-projects | spring-framework | ba468a731fc49a383021d3243e6934d29aa1a802.json | Remove JamonPerformanceMonitorInterceptor support
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.
Closes gh-27786 | spring-webflux/spring-webflux.gradle | @@ -21,7 +21,7 @@ dependencies {
exclude group: "jakarta.servlet", module: "jakarta.servlet-api"
}
optional("org.eclipse.jetty.websocket:websocket-jetty-client")
- optional("io.undertow:undertow-websockets-jsr-jakartaee9")
+ optional("io.undertow:undertow-websockets-jsr-jakarta")
optional("org.apache.httpcompo... | true |
Other | spring-projects | spring-framework | ba468a731fc49a383021d3243e6934d29aa1a802.json | Remove JamonPerformanceMonitorInterceptor support
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.
Closes gh-27786 | spring-websocket/spring-websocket.gradle | @@ -18,8 +18,8 @@ dependencies {
}
optional("org.eclipse.jetty.websocket:websocket-jetty-client")
optional("org.eclipse.jetty:jetty-client")
- optional("io.undertow:undertow-servlet-jakartaee9")
- optional("io.undertow:undertow-websockets-jsr-jakartaee9")
+ optional("io.undertow:undertow-servlet-jakarta")
+ optio... | true |
Other | spring-projects | spring-framework | 5d91560f9230a1673036ee0a9b5e4aa75c4f148c.json | Avoid unescape for CONNECT and CONNECTED frames
See gh-27722 | spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java | @@ -143,7 +143,7 @@ private Message<byte[]> decodeMessage(ByteBuffer byteBuffer, @Nullable MultiValu
StompCommand stompCommand = StompCommand.valueOf(command);
headerAccessor = StompHeaderAccessor.create(stompCommand);
initHeaders(headerAccessor);
- readHeaders(byteBuffer, headerAccessor);
+ readHe... | true |
Other | spring-projects | spring-framework | 5d91560f9230a1673036ee0a9b5e4aa75c4f148c.json | Avoid unescape for CONNECT and CONNECTED frames
See gh-27722 | spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompDecoderTests.java | @@ -159,6 +159,23 @@ public void decodeFrameWithEscapedHeaders() {
assertThat(headers.getFirstNativeHeader("a:\r\n\\b")).isEqualTo("alpha:bravo\r\n\\");
}
+ @Test
+ public void decodeFrameWithHeaderWithBackslashValue() {
+ String accept = "accept-version:1.1\n";
+ String keyAndValueWithBackslash = "key:\\value... | true |
Other | spring-projects | spring-framework | d836fb4a7a8952ee1de3df9567eec4052349cedb.json | Remove unnecessary @SuppressWarnings
See gh-27807 | spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java | @@ -182,7 +182,6 @@ private void registerBeanDefinitionForImportedConfigurationClass(ConfigurationCl
* Read the given {@link BeanMethod}, registering bean definitions
* with the BeanDefinitionRegistry based on its contents.
*/
- @SuppressWarnings("deprecation") // for RequiredAnnotationBeanPostProcessor.SKIP_... | false |
Other | spring-projects | spring-framework | 31b8587ce61b2a37268eeaf2c83bd57b65ccd141.json | Update copyright year of changed file
See gh-27804 | spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceAdapter.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2021 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. | false |
Other | spring-projects | spring-framework | 00375df4e8acc97f88c96cfaf5e4c0c44e7f8960.json | Fix javadoc reference to ThrowsAdvice
See gh-27804 | spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceAdapter.java | @@ -25,7 +25,7 @@
import org.springframework.aop.ThrowsAdvice;
/**
- * Adapter to enable {@link org.springframework.aop.MethodBeforeAdvice}
+ * Adapter to enable {@link org.springframework.aop.ThrowsAdvice}
* to be used in the Spring AOP framework.
*
* @author Rod Johnson | false |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java | @@ -578,8 +578,8 @@ private String decodeInternal(HttpServletRequest request, String source) {
return UriUtils.decode(source, enc);
}
catch (UnsupportedCharsetException ex) {
- if (logger.isWarnEnabled()) {
- logger.warn("Could not decode request string [" + source + "] with encoding '" + enc +
+ if (l... | true |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-webflux/src/main/java/org/springframework/web/reactive/resource/PathResourceResolver.java | @@ -29,6 +29,7 @@
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource;
+import org.springframework.core.log.LogFormatUtils;
import org.springframework.lang.Nullable;
import org.springframework.util.StringUtils;
import or... | true |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceWebHandler.java | @@ -39,6 +39,7 @@
import org.springframework.core.codec.Hints;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
+import org.springframework.core.log.LogFormatUtils;
import org.springframework.http.CacheControl;
import org.springframework.http.HttpHeaders;
import org.... | true |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -69,9 +69,8 @@ protected void addBindValues(... | true |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ReactiveTypeHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -202,7 +202,7 @@ private void logExecutorWar... | true |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java | @@ -33,6 +33,7 @@
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource;
+import org.springframework.core.log.LogFormatUtils;
import org.springframework.http.server.PathContainer;
import org.springframework.lang.Nullable;
... | true |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java | @@ -39,6 +39,7 @@
import org.springframework.context.EmbeddedValueResolverAware;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource;
+import org.springframework.core.log.LogFormatUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;... | true |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-websocket/src/main/java/org/springframework/web/socket/server/support/AbstractHandshakeHandler.java | @@ -29,6 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.springframework.context.Lifecycle;
+import org.springframework.core.log.LogFormatUtils;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.server.ServerHttpRequest;
@@ -... | true |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java | @@ -32,6 +32,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.springframework.core.log.LogFormatUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
@@ -377,7 +378,8 @@ publ... | true |
Other | spring-projects | spring-framework | e9083d7d2053fea3919bfeb9057e9fdba4049119.json | Apply LogFormatUtils in more places | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -30,6 +30,7 @@
import java.util.concurrent.... | true |
Other | spring-projects | spring-framework | ec7425c1f4b5024a87d9af6de2a19eb29727cc24.json | Fix typo in javadoc for ResponseExtractor | spring-web/src/main/java/org/springframework/web/client/ResponseExtractor.java | @@ -23,7 +23,7 @@
import org.springframework.lang.Nullable;
/**
- * Generic callback interface used by {@link RestTemplate}'s retrieval methods
+ * Generic callback interface used by {@link RestTemplate}'s retrieval methods.
* Implementations of this interface perform the actual work of extracting data
* from a... | false |
Other | spring-projects | spring-framework | 3714d0e401102c4b9215dab3889dd31ba38d979f.json | Expose future response in new AsyncServerResponse
This commit introduces AsyncServerResponse, an extension of
ServerResponse that is returned from ServerResponse.async and that
allows users to get the future response by calling the block method.
This is particularly useful for testing purposes. | spring-webmvc/src/main/java/org/springframework/web/servlet/function/AsyncServerResponse.java | @@ -16,161 +16,61 @@
package org.springframework.web.servlet.function;
-import java.io.IOException;
import java.time.Duration;
import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.CompletionException;
-import java.util.function.Function;
-
-import javax.servlet.ServletException;
-import ja... | true |
Other | spring-projects | spring-framework | 3714d0e401102c4b9215dab3889dd31ba38d979f.json | Expose future response in new AsyncServerResponse
This commit introduces AsyncServerResponse, an extension of
ServerResponse that is returned from ServerResponse.async and that
allows users to get the future response by calling the block method.
This is particularly useful for testing purposes. | spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultAsyncServerResponse.java | @@ -0,0 +1,191 @@
+/*
+ * Copyright 2002-2020 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
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
... | true |
Other | spring-projects | spring-framework | 3714d0e401102c4b9215dab3889dd31ba38d979f.json | Expose future response in new AsyncServerResponse
This commit introduces AsyncServerResponse, an extension of
ServerResponse that is returned from ServerResponse.async and that
allows users to get the future response by calling the block method.
This is particularly useful for testing purposes. | spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultEntityResponseBuilder.java | @@ -208,7 +208,7 @@ public EntityResponse<T> build() {
return new CompletionStageEntityResponse(this.status, this.headers, this.cookies,
completionStage, this.entityType);
}
- else if (AsyncServerResponse.reactiveStreamsPresent) {
+ else if (DefaultAsyncServerResponse.reactiveStreamsPresent) {
Reacti... | true |
Other | spring-projects | spring-framework | 3714d0e401102c4b9215dab3889dd31ba38d979f.json | Expose future response in new AsyncServerResponse
This commit introduces AsyncServerResponse, an extension of
ServerResponse that is returned from ServerResponse.async and that
allows users to get the future response by calling the block method.
This is particularly useful for testing purposes. | spring-webmvc/src/main/java/org/springframework/web/servlet/function/ServerResponse.java | @@ -236,7 +236,7 @@ static BodyBuilder unprocessableEntity() {
* @since 5.3
*/
static ServerResponse async(Object asyncResponse) {
- return AsyncServerResponse.create(asyncResponse, null);
+ return DefaultAsyncServerResponse.create(asyncResponse, null);
}
/**
@@ -257,7 +257,7 @@ static ServerResponse as... | true |
Other | spring-projects | spring-framework | 3714d0e401102c4b9215dab3889dd31ba38d979f.json | Expose future response in new AsyncServerResponse
This commit introduces AsyncServerResponse, an extension of
ServerResponse that is returned from ServerResponse.async and that
allows users to get the future response by calling the block method.
This is particularly useful for testing purposes. | spring-webmvc/src/main/java/org/springframework/web/servlet/function/SseServerResponse.java | @@ -89,7 +89,7 @@ protected ModelAndView writeToInternal(HttpServletRequest request, HttpServletRe
result = new DeferredResult<>();
}
- AsyncServerResponse.writeAsync(request, response, result);
+ DefaultAsyncServerResponse.writeAsync(request, response, result);
this.sseConsumer.accept(new DefaultSseBuild... | true |
Other | spring-projects | spring-framework | 3714d0e401102c4b9215dab3889dd31ba38d979f.json | Expose future response in new AsyncServerResponse
This commit introduces AsyncServerResponse, an extension of
ServerResponse that is returned from ServerResponse.async and that
allows users to get the future response by calling the block method.
This is particularly useful for testing purposes. | spring-webmvc/src/test/java/org/springframework/web/servlet/function/DefaultAsyncServerResponseTests.java | @@ -0,0 +1,39 @@
+/*
+ * Copyright 2002-2020 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
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | spring-web/src/main/java/org/springframework/http/server/DelegatingServerHttpResponse.java | @@ -0,0 +1,79 @@
+/*
+ * Copyright 2002-2020 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
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | spring-webmvc/src/main/java/org/springframework/web/servlet/function/AbstractServerResponse.java | @@ -0,0 +1,141 @@
+/*
+ * Copyright 2002-2020 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
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultEntityResponseBuilder.java | @@ -237,8 +237,7 @@ public static <T> EntityResponse.Builder<T> fromObject(T t, ParameterizedTypeRef
/**
* Default {@link EntityResponse} implementation for synchronous bodies.
*/
- private static class DefaultEntityResponse<T> extends DefaultServerResponseBuilder.AbstractServerResponse
- implements EntityRes... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultRenderingResponseBuilder.java | @@ -150,8 +150,7 @@ public RenderingResponse build() {
}
- private static final class DefaultRenderingResponse extends DefaultServerResponseBuilder.AbstractServerResponse
- implements RenderingResponse {
+ private static final class DefaultRenderingResponse extends AbstractServerResponse implements RenderingRes... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerResponseBuilder.java | @@ -16,20 +16,16 @@
package org.springframework.web.servlet.function;
-import java.io.IOException;
import java.net.URI;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.util.Arrays;
-import java.util.Collection;
-import java.util.EnumSet;
import java.util.LinkedHashSet;
import java.util.... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | spring-webmvc/src/main/java/org/springframework/web/servlet/function/ServerResponse.java | @@ -230,11 +230,6 @@ static BodyBuilder unprocessableEntity() {
* <p>This method can be used to set the response status code, headers, and
* body based on an asynchronous result. If only the body is asynchronous,
* {@link BodyBuilder#body(Object)} can be used instead.
- *
- * <p><strong>Note</strong> that
- ... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | spring-webmvc/src/main/java/org/springframework/web/servlet/function/SseServerResponse.java | @@ -0,0 +1,292 @@
+/*
+ * Copyright 2002-2020 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
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyEmitterReturnValueHandler.java | @@ -17,7 +17,6 @@
package org.springframework.web.servlet.mvc.method.annotation;
import java.io.IOException;
-import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
@@ -31,11 +30,11 @@
import org.springframework.core.ResolvableType;
import org.... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | spring-webmvc/src/test/java/org/springframework/web/servlet/function/SseServerResponseTests.java | @@ -0,0 +1,145 @@
+/*
+ * Copyright 2002-2020 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
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
... | true |
Other | spring-projects | spring-framework | a1320cd450089b88eb689686dbb67bed05bdf8c9.json | Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.
Closes gh-25920 | src/docs/asciidoc/web/webmvc-functional.adoc | @@ -229,6 +229,60 @@ Mono<ServerResponse> asyncResponse = webClient.get().retrieve().bodyToMono(Perso
ServerResponse.async(asyncResponse);
----
+https://www.w3.org/TR/eventsource/[Server-Sent Events] can be provided via the
+static `sse` method on `ServerResponse`. The builder provided by that method
+allows you to... | true |
Other | spring-projects | spring-framework | 1e19e51c9c7912c53726bbc250eb8efd3526aac4.json | Fix exchangeToMono sample in reference
Closes gh-26189 | src/docs/asciidoc/web/webflux-webclient.adoc | @@ -547,37 +547,39 @@ depending on the response status:
.Java
----
Mono<Object> entityMono = client.get()
- .uri("/persons/1")
- .accept(MediaType.APPLICATION_JSON)
- .exchangeToMono(response -> {
- if (response.statusCode().equals(HttpStatus.OK)) {
- return response.bodyToMono(Person.class);... | false |
Other | spring-projects | spring-framework | 69aed83504c098027e5d878df0b0cf40439facb5.json | Use nested path variables instead of Servlet's
Remove the overriden pathVariable method from the nested request
wrapper,so that the merged attributes are used instead of the ones
provided by servlet.
Closes gh-26163 | spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java | @@ -1040,11 +1040,6 @@ public MultiValueMap<String, Part> multipartData() throws IOException, ServletEx
return this.request.multipartData();
}
- @Override
- public String pathVariable(String name) {
- return this.request.pathVariable(name);
- }
-
@Override
@SuppressWarnings("unchecked")
public Ma... | true |
Other | spring-projects | spring-framework | 69aed83504c098027e5d878df0b0cf40439facb5.json | Use nested path variables instead of Servlet's
Remove the overriden pathVariable method from the nested request
wrapper,so that the merged attributes are used instead of the ones
provided by servlet.
Closes gh-26163 | spring-webmvc/src/test/java/org/springframework/web/servlet/function/RouterFunctionsTests.java | @@ -22,6 +22,7 @@
import org.junit.jupiter.api.Test;
import org.springframework.web.servlet.handler.PathPatternsTestUtils;
+import org.springframework.web.testfixture.servlet.MockHttpServletRequest;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.BDDMockito.given;
@@ -97,4 +9... | true |
Other | spring-projects | spring-framework | 86f9716fef89a25462f5d55c9d430cf8cd62c82c.json | Remove misleading default note on ISO.DATE_TIME
Closes gh-26134 | spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2020 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.
@@ -106,7 +106,6 @@ enum ISO {
/**
* The... | false |
Other | spring-projects | spring-framework | 80701082cd872a2526823dc26bc7f9271e52bd48.json | Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.
Closes gh-26119 | spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.java | @@ -108,7 +108,7 @@
private String parameterName = "format";
- private boolean favorPathExtension = true;
+ private boolean favorPathExtension = false;
private Map<String, MediaType> mediaTypes = new HashMap<>();
| true |
Other | spring-projects | spring-framework | 80701082cd872a2526823dc26bc7f9271e52bd48.json | Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.
Closes gh-26119 | spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java | @@ -72,8 +72,8 @@ void defaultSettings() throws Exception {
this.servletRequest.setRequestURI("/flower.gif");
assertThat(manager.resolveMediaTypes(this.webRequest))
- .as("Should be able to resolve file extensions by default")
- .isEqualTo(Collections.singletonList(MediaType.IMAGE_GIF));
+ .as("Should ... | true |
Other | spring-projects | spring-framework | 80701082cd872a2526823dc26bc7f9271e52bd48.json | Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.
Closes gh-26119 | spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java | @@ -206,7 +206,9 @@ public void testDefaultConfig() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest("GET", "/foo.json");
NativeWebRequest webRequest = new ServletWebRequest(request);
ContentNegotiationManager manager = mapping.getContentNegotiationManager();
- assertThat(manager... | true |
Other | spring-projects | spring-framework | 80701082cd872a2526823dc26bc7f9271e52bd48.json | Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.
Closes gh-26119 | spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2020 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,26 +59,34 @@ public void defaultSettings... | true |
Other | spring-projects | spring-framework | 80701082cd872a2526823dc26bc7f9271e52bd48.json | Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.
Closes gh-26119 | spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java | @@ -33,7 +33,6 @@
import org.springframework.core.io.FileSystemResourceLoader;
import org.springframework.format.FormatterRegistry;
import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http... | true |
Other | spring-projects | spring-framework | 80701082cd872a2526823dc26bc7f9271e52bd48.json | Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.
Closes gh-26119 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java | @@ -1742,6 +1742,7 @@ void responseBodyAsHtml(boolean usePathPatterns) throws Exception {
}
ContentNegotiationManagerFactoryBean factoryBean = new ContentNegotiationManagerFactoryBean();
+ factoryBean.setFavorPathExtension(true);
factoryBean.afterPropertiesSet();
RootBeanDefinition adapterDef = ne... | true |
Other | spring-projects | spring-framework | 80701082cd872a2526823dc26bc7f9271e52bd48.json | Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.
Closes gh-26119 | spring-webmvc/src/test/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolverTests.java | @@ -34,6 +34,7 @@
import org.springframework.web.accept.HeaderContentNegotiationStrategy;
import org.springframework.web.accept.MappingMediaTypeFileExtensionResolver;
import org.springframework.web.accept.ParameterContentNegotiationStrategy;
+import org.springframework.web.accept.PathExtensionContentNegotiationStrat... | true |
Other | spring-projects | spring-framework | 80701082cd872a2526823dc26bc7f9271e52bd48.json | Set favorPathExtension to false by default
Applies a change that was intended in #23915 but wasn't.
Closes gh-26119 | spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-content-negotiation-manager.xml | @@ -14,6 +14,7 @@
</mvc:view-resolvers>
<bean id="mvcContentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
+ <property name="favorParameter" value="true"/>
<property name="mediaTypes">
<value>
xml=application/rss+xml | true |
Other | spring-projects | spring-framework | 4ed645e7109f1bf9560761d9963f5716e6cfc378.json | Fix broken links to XSD schemas in ref docs
Closes gh-26129 | src/docs/asciidoc/core/core-appendix.adoc | @@ -666,7 +666,8 @@ integrate such parsers into the Spring IoC container.
To facilitate authoring configuration files that use a schema-aware XML editor,
Spring's extensible XML configuration mechanism is based on XML Schema. If you are not
familiar with Spring's current XML configuration extensions that come with t... | true |
Other | spring-projects | spring-framework | 4ed645e7109f1bf9560761d9963f5716e6cfc378.json | Fix broken links to XSD schemas in ref docs
Closes gh-26129 | src/docs/asciidoc/languages/dynamic-languages.adoc | @@ -92,7 +92,7 @@ container. Using the dynamic-language-backed beans with a plain `BeanFactory`
implementation is supported, but you have to manage the plumbing of the Spring internals
to do so.
-For more information on schema-based configuration, see <<appendix.adoc#xsd-configuration,
+For more information on sche... | true |
Other | spring-projects | spring-framework | 45a922704736beb7160bf7fdca5bd236caf9212d.json | Remove TODO from AbstractAspectJAdvice
Despite the code duplication, we will not delegate to
AopUtils.invokeJoinpointUsingReflection() from
AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs().
The rationale is that the exception message in
invokeAdviceMethodWithGivenArgs() provides additional context via the
poin... | spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java | @@ -631,7 +631,6 @@ protected Object invokeAdviceMethodWithGivenArgs(Object[] args) throws Throwable
}
try {
ReflectionUtils.makeAccessible(this.aspectJAdviceMethod);
- // TODO AopUtils.invokeJoinpointUsingReflection
return this.aspectJAdviceMethod.invoke(this.aspectInstanceFactory.getAspectInstance(), ... | false |
Other | spring-projects | spring-framework | f1af8a6ae956f2523cb7f2f63710164babac6ddf.json | Fix checkstyle violation | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java | @@ -16,7 +16,7 @@
package org.springframework.web.servlet.mvc.method.annotation;
-import java.awt.*;
+import java.awt.Color;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; | false |
Other | spring-projects | spring-framework | c4d7e6ff46348a34c55e45b1d26726d3ef6cf259.json | Fix checkstyle violations
See gh-26117 | spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultWebClientTests.java | @@ -31,7 +31,6 @@
import org.mockito.junit.jupiter.MockitoSettings;
import org.mockito.quality.Strictness;
import org.reactivestreams.Publisher;
-import org.springframework.web.reactive.function.BodyExtractors;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
@@ -41,6 +40,7 @@
import org.sp... | true |
Other | spring-projects | spring-framework | c4d7e6ff46348a34c55e45b1d26726d3ef6cf259.json | Fix checkstyle violations
See gh-26117 | spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java | @@ -41,7 +41,6 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
-import org.springframework.web.reactive.function.BodyExtractors;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.ne... | true |
Other | spring-projects | spring-framework | 8130bf505fa69a00e0d566db36e543a9cf030683.json | Apply allowedOriginPatterns in SockJsService
See gh-26108 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java | @@ -25,7 +25,6 @@
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Random;
-import java.util.Set;
import java.util.concurrent.TimeUnit;
import javax.servlet.http.HttpServletRequest;
@@ -97,9 +96,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
priva... | true |
Other | spring-projects | spring-framework | 8130bf505fa69a00e0d566db36e543a9cf030683.json | Apply allowedOriginPatterns in SockJsService
See gh-26108 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java | @@ -344,7 +344,8 @@ protected boolean validateRequest(String serverId, String sessionId, String tran
return false;
}
- if (!this.allowedOrigins.contains("*")) {
+ if (!getAllowedOrigins().isEmpty() && !getAllowedOrigins().contains("*") ||
+ !getAllowedOriginPatterns().isEmpty()) {
TransportType transp... | true |
Other | spring-projects | spring-framework | 8130bf505fa69a00e0d566db36e543a9cf030683.json | Apply allowedOriginPatterns in SockJsService
See gh-26108 | spring-websocket/src/test/java/org/springframework/web/socket/sockjs/support/SockJsServiceTests.java | @@ -215,18 +215,20 @@ public void handleInfoOptionsWithForbiddenOrigin() {
@Test // SPR-12283
public void handleInfoOptionsWithOriginAndCorsHeadersDisabled() {
this.servletRequest.addHeader(HttpHeaders.ORIGIN, "https://mydomain2.example");
- this.service.setAllowedOrigins(Collections.singletonList("*"));
+ th... | true |
Other | spring-projects | spring-framework | ae75db265704103eab8bad8ca388d2d1cd9ed846.json | Add allowedOriginPatterns to SockJS config
See gh-26108 | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/SockJsServiceRegistration.java | @@ -73,6 +73,8 @@ public class SockJsServiceRegistration {
private final List<String> allowedOrigins = new ArrayList<>();
+ private final List<String> allowedOriginPatterns = new ArrayList<>();
+
@Nullable
private Boolean suppressCors;
@@ -232,6 +234,18 @@ protected SockJsServiceRegistration setAllowedOrigi... | true |
Other | spring-projects | spring-framework | ae75db265704103eab8bad8ca388d2d1cd9ed846.json | Add allowedOriginPatterns to SockJS config
See gh-26108 | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/StompWebSocketEndpointRegistration.java | @@ -61,4 +61,11 @@ public interface StompWebSocketEndpointRegistration {
*/
StompWebSocketEndpointRegistration setAllowedOrigins(String... origins);
+ /**
+ * Configure allowed {@code Origin} header values.
+ *
+ * @see org.springframework.web.cors.CorsConfiguration#setAllowedOriginPatterns(java.util.List)
+ ... | true |
Other | spring-projects | spring-framework | ae75db265704103eab8bad8ca388d2d1cd9ed846.json | Add allowedOriginPatterns to SockJS config
See gh-26108 | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java | @@ -58,6 +58,8 @@ public class WebMvcStompWebSocketEndpointRegistration implements StompWebSocketE
private final List<String> allowedOrigins = new ArrayList<>();
+ private final List<String> allowedOriginPatterns = new ArrayList<>();
+
@Nullable
private SockJsServiceRegistration registration;
@@ -97,6 +99,1... | true |
Other | spring-projects | spring-framework | ae75db265704103eab8bad8ca388d2d1cd9ed846.json | Add allowedOriginPatterns to SockJS config
See gh-26108 | spring-websocket/src/main/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptor.java | @@ -16,11 +16,12 @@
package org.springframework.web.socket.server.support;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.LinkedHashSet;
+import java.util.HashSet;
+import java.util.List;
import java.util.Map;
-import java.util.Set;
import org.apache... | true |
Other | spring-projects | spring-framework | ae75db265704103eab8bad8ca388d2d1cd9ed846.json | Add allowedOriginPatterns to SockJS config
See gh-26108 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java | @@ -99,6 +99,8 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
protected final Set<String> allowedOrigins = new LinkedHashSet<>();
+ protected final Set<String> allowedOriginPatterns = new LinkedHashSet<>();
+
private final SockJsRequestHandler infoHandler = new InfoHandler()... | true |
Other | spring-projects | spring-framework | ae75db265704103eab8bad8ca388d2d1cd9ed846.json | Add allowedOriginPatterns to SockJS config
See gh-26108 | spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistrationTests.java | @@ -135,6 +135,32 @@ public void allowedOriginsWithSockJsService() {
assertThat(sockJsService.shouldSuppressCors()).isFalse();
}
+ @Test
+ public void allowedOriginPatterns() {
+ WebMvcStompWebSocketEndpointRegistration registration =
+ new WebMvcStompWebSocketEndpointRegistration(new String[] {"/foo"}, this... | true |
Other | spring-projects | spring-framework | 4cc831238c825c6d361d35ebf2563603da5eccae.json | Revise Servlet 4 HttpServletMapping check
Closes gh-26112 | spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java | @@ -22,6 +22,7 @@
import java.util.Properties;
import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpServletMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.MappingMatch;
@@ -60,9 +61,8 @@ public class UrlPathHelper {
*/
public static final String PATH_ATTRIBUT... | false |
Other | spring-projects | spring-framework | c9b27af64f41cc4fd06ee41a0faaca867e3cba4e.json | Reduce overhead of char[] creation
There are more locations which could benefit from not using a
toCharArray on a String, but rather use the charAt method from
the String itself. This to prevent an additional copy of the
char[] being created. | spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java | @@ -475,8 +475,8 @@ private String maybeExtractVariableName(@Nullable String candidateToken) {
}
if (Character.isJavaIdentifierStart(candidateToken.charAt(0)) &&
Character.isLowerCase(candidateToken.charAt(0))) {
- char[] tokenChars = candidateToken.toCharArray();
- for (char tokenChar : tokenChars) {
+ ... | true |
Other | spring-projects | spring-framework | c9b27af64f41cc4fd06ee41a0faaca867e3cba4e.json | Reduce overhead of char[] creation
There are more locations which could benefit from not using a
toCharArray on a String, but rather use the charAt method from
the String itself. This to prevent an additional copy of the
char[] being created. | spring-core/src/main/java/org/springframework/core/Conventions.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2020 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.
@@ -225,11 +225,11 @@ public static String attr... | true |
Other | spring-projects | spring-framework | c9b27af64f41cc4fd06ee41a0faaca867e3cba4e.json | Reduce overhead of char[] creation
There are more locations which could benefit from not using a
toCharArray on a String, but rather use the charAt method from
the String itself. This to prevent an additional copy of the
char[] being created. | spring-web/src/main/java/org/springframework/http/ContentDisposition.java | @@ -485,7 +485,8 @@ private static String escapeQuotationsInFilename(String filename) {
}
boolean escaped = false;
StringBuilder sb = new StringBuilder();
- for (char c : filename.toCharArray()) {
+ for (int i = 0; i < filename.length() ; i++) {
+ char c = filename.charAt(i);
if (!escaped && c == '"') ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.