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
c515de138aa659ba9697383a07a9bc1bf5be4d81.json
Correct import order
spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java
@@ -16,6 +16,8 @@ package org.springframework.expression.spel.ast; +import java.util.StringJoiner; + import org.springframework.asm.MethodVisitor; import org.springframework.expression.EvaluationException; import org.springframework.expression.TypedValue; @@ -24,8 +26,6 @@ import org.springframework.expression...
false
Other
spring-projects
spring-framework
c2bd229d4ce7481e05a1407e63cfe82695eb5c7f.json
Clarify role of 'aware' callback interfaces
src/docs/asciidoc/core/core-beans.adoc
@@ -3746,16 +3746,16 @@ Thus, beans can programmatically manipulate the `ApplicationContext` that create through the `ApplicationContext` interface or by casting the reference to a known subclass of this interface (such as `ConfigurableApplicationContext`, which exposes additional functionality). One use would be th...
true
Other
spring-projects
spring-framework
c2bd229d4ce7481e05a1407e63cfe82695eb5c7f.json
Clarify role of 'aware' callback interfaces
src/docs/asciidoc/core/core-resources.adoc
@@ -323,9 +323,9 @@ The following table summarizes the strategy for converting `String` objects to ` [[resources-resourceloaderaware]] == The `ResourceLoaderAware` interface -The `ResourceLoaderAware` interface is a special marker interface that identifies objects -that expect to be provided with a `ResourceLoader`...
true
Other
spring-projects
spring-framework
9c48d63082e371da4d0870f6e222db35a4412362.json
Release cached item in ChannelSendOperator 1. If the write Subscriber cancels with the item cached, release it. 2. If the write Publisher emits an error while the item is cached, when the write Subscriber subscribes, release the cached item and emit the error signal. Closes gh-22720
spring-web/src/main/java/org/springframework/http/server/reactive/ChannelSendOperator.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -28,6 +28,8 @@ import reactor.core.publishe...
true
Other
spring-projects
spring-framework
9c48d63082e371da4d0870f6e222db35a4412362.json
Release cached item in ChannelSendOperator 1. If the write Subscriber cancels with the item cached, release it. 2. If the write Publisher emits an error while the item is cached, when the write Subscriber subscribes, release the cached item and emit the error signal. Closes gh-22720
spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * 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. @@ -16,25 +16,29 @@ package org.springframew...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/main/java/org/springframework/web/cors/CorsUtils.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * 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. @@ -20,6 +20,10 @@ import org.springframewor...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -19,7 +19,6 @@ import java.io.IOException; ...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/main/java/org/springframework/web/cors/reactive/CorsUtils.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -36,18 +36,21 @@ public abstract class Cors...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/main/java/org/springframework/web/cors/reactive/CorsWebFilter.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -75,14 +75,10 @@ public CorsWebFilter(CorsCo...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/main/java/org/springframework/web/cors/reactive/DefaultCorsProcessor.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -40,8 +40,7 @@ * <p>Note that when input {...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/main/java/org/springframework/web/filter/CorsFilter.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * 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. @@ -83,16 +83,11 @@ public void setCorsProcesso...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * 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. @@ -62,11 +62,6 @@ public void isNotPreFlightRe...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java
@@ -51,13 +51,35 @@ public class DefaultCorsProcessorTests { public void setup() { this.request = new MockHttpServletRequest(); this.request.setRequestURI("/test.html"); - this.request.setRemoteHost("domain1.com"); + this.request.setServerName("domain1.com"); this.conf = new CorsConfiguration(); this.re...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/test/java/org/springframework/web/cors/reactive/CorsUtilsTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -39,7 +39,7 @@ public class CorsUtilsTests {...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/test/java/org/springframework/web/cors/reactive/CorsWebFilterTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * 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. @@ -63,6 +63,46 @@ public void setup() throws E...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/test/java/org/springframework/web/cors/reactive/DefaultCorsProcessorTests.java
@@ -60,6 +60,37 @@ public void setup() { } + @Test + public void requestWithoutOriginHeader() throws Exception { + MockServerHttpRequest request = MockServerHttpRequest + .method(HttpMethod.GET, "http://domain1.com/test.html") + .build(); + ServerWebExchange exchange = MockServerWebExchange.from(request);...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * 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. @@ -52,6 +52,36 @@ public void setup() throws E...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractHandlerMapping.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -23,6 +23,7 @@ import org.springframework.b...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-webflux/src/main/java/org/springframework/web/reactive/result/method/AbstractHandlerMethodMapping.java
@@ -370,6 +370,13 @@ protected HandlerMethod handleNoMatch(Set<T> mappings, ServerWebExchange exchang return null; } + @Override + protected boolean hasCorsConfigurationSource(Object handler) { + return super.hasCorsConfigurationSource(handler) || + (handler instanceof HandlerMethod && this.mappingRegistry.g...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-webflux/src/test/java/org/springframework/web/reactive/handler/CorsUrlHandlerMappingTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -31,7 +31,6 @@ import static org.junit.Asse...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -81,7 +81,8 @@ public abstract class Abstrac...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java
@@ -448,6 +448,13 @@ protected HandlerMethod handleNoMatch(Set<T> mappings, String lookupPath, HttpSe return null; } + @Override + protected boolean hasCorsConfigurationSource(Object handler) { + return super.hasCorsConfigurationSource(handler) || + (handler instanceof HandlerMethod && this.mappingRegistry.g...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -138,7 +138,7 @@ public void handlerMappings...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-webmvc/src/test/java/org/springframework/web/servlet/handler/CorsAbstractHandlerMappingTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * 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. @@ -81,8 +81,7 @@ public void preflightRequestW...
true
Other
spring-projects
spring-framework
d27b5d0ab6e8b91a77e272ad57ae83c7d81d810b.json
Improve CORS handling This commit improves CORS support by: - Using CORS processing only for CORS-enabled endpoints - Skipping CORS processing for same-origin requests - Adding Vary headers for non-CORS requests It introduces an AbstractHandlerMapping#hasCorsConfigurationSource method in order to be able to check ...
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
@@ -33,6 +33,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.InvalidMediaTypeException; @@ -48,7 +49,6 @@...
true
Other
spring-projects
spring-framework
beb491b840ee416d6fca23b8db4a6d9df6040911.json
Use Dispatchers.Unconfined for Coroutines As of Coroutines 1.2.0-alpha, Dispatchers.Unconfined is a stable API so we can leverage it in order to get better performances in our Reactive to Coroutines bridge. See gh-19975
spring-core-coroutines/src/main/kotlin/org/springframework/core/CoroutinesUtils.kt
@@ -18,6 +18,7 @@ package org.springframework.core import kotlinx.coroutines.Deferred +import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.async import kotlinx.coroutines.reactive.awaitFirstOrNull @@ -36,15 +37,17 @@ import kotlin.reflect.jvm.kotlinFunction * @...
true
Other
spring-projects
spring-framework
beb491b840ee416d6fca23b8db4a6d9df6040911.json
Use Dispatchers.Unconfined for Coroutines As of Coroutines 1.2.0-alpha, Dispatchers.Unconfined is a stable API so we can leverage it in order to get better performances in our Reactive to Coroutines bridge. See gh-19975
spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/WebClientExtensions.kt
@@ -16,6 +16,7 @@ package org.springframework.web.reactive.function.client +import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.reactive.awaitSingle import kotlinx.coroutines.reactor.mono @@ -77,7 +78,7 @@ suspend fun WebClient.RequestHeadersSpec<out WebClient.R...
true
Other
spring-projects
spring-framework
beb491b840ee416d6fca23b8db4a6d9df6040911.json
Use Dispatchers.Unconfined for Coroutines As of Coroutines 1.2.0-alpha, Dispatchers.Unconfined is a stable API so we can leverage it in order to get better performances in our Reactive to Coroutines bridge. See gh-19975
spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt
@@ -16,6 +16,7 @@ package org.springframework.web.reactive.function.server +import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.reactor.mono import org.springframework.core.io.Resource @@ -389,7 +390,7 @@ open class CoRouterFunctionDsl(private val init: (CoRoute...
true
Other
spring-projects
spring-framework
beb491b840ee416d6fca23b8db4a6d9df6040911.json
Use Dispatchers.Unconfined for Coroutines As of Coroutines 1.2.0-alpha, Dispatchers.Unconfined is a stable API so we can leverage it in order to get better performances in our Reactive to Coroutines bridge. See gh-19975
spring-webflux/src/main/kotlin/org/springframework/web/reactive/server/ServerWebExchangeExtensions.kt
@@ -16,6 +16,7 @@ package org.springframework.web.reactive.server +import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.reactive.awaitSingle import kotlinx.coroutines.reactor.mono @@ -68,4 +69,4 @@ suspend fun ServerWebExchange.awaitSession(): WebSession = * @s...
true
Other
spring-projects
spring-framework
76e5a2a53b4c71c33a7cd9bfb373df15d1299909.json
Remove superfluous empty lines
src/docs/asciidoc/web/webmvc-view.adoc
@@ -943,7 +943,6 @@ For an example of this tag, see <<mvc-view-jsp-formtaglib-formtag>>. You can als HTML5-specific types, such as `email`, `tel`, `date`, and others. - [[mvc-view-jsp-formtaglib-checkboxtag]] ==== The `checkbox` Tag @@ -1061,7 +1060,6 @@ telling Spring that "`the checkbox was visible in the fo...
true
Other
spring-projects
spring-framework
76e5a2a53b4c71c33a7cd9bfb373df15d1299909.json
Remove superfluous empty lines
src/docs/asciidoc/web/webmvc.adoc
@@ -2121,7 +2121,6 @@ The following example shows how to get the cookie value: ---- <1> Get the value of the `JSESSIONID` cookie. - If the target method parameter type is not `String`, type conversion is applied automatically. See <<mvc-ann-typeconversion>>.
true
Other
spring-projects
spring-framework
f273fa990c5231684b0dedf4895d9e6bd8f66235.json
Use RepeatableContainers.none() in AnnotationUtils Update `AnnotationUtils` so that `RepeatableContainers.none()` is used when performing an exhaustive search for merged annotations. These parameters were accidentally removed in commit 210b1789 and weren't caught earlier because we were missing a test. Closes gh-2270...
spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java
@@ -197,7 +197,8 @@ public static <A extends Annotation> A getAnnotation(Annotation annotation, Clas return null; } // Exhaustive retrieval of merged annotations... - return MergedAnnotations.from(annotation) + return MergedAnnotations.from(null, new Annotation[] {annotation}, + RepeatableContainers.non...
true
Other
spring-projects
spring-framework
f273fa990c5231684b0dedf4895d9e6bd8f66235.json
Use RepeatableContainers.none() in AnnotationUtils Update `AnnotationUtils` so that `RepeatableContainers.none()` is used when performing an exhaustive search for merged annotations. These parameters were accidentally removed in commit 210b1789 and weren't caught earlier because we were missing a test. Closes gh-2270...
spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java
@@ -979,6 +979,13 @@ public void synthesizeAnnotationFromAnnotationAttributesWithoutAttributeAliases( assertEquals("value from synthesized component: ", "webController", synthesizedComponent.value()); } + @Test // gh-22702 + public void findAnnotationWithRepeatablesElements() { + assertNull(AnnotationUtils.find...
true
Other
spring-projects
spring-framework
800cbf2524c5548ddc259f62f30d1845801cd665.json
Ignore 'value' attribute in AnnotationTypeMapping Update `addConventionAnnotationValues` so that `value` attributes do not override existing annotation values. The aligns the new `MergedAnnotations` API with the previous `AnnotatedElementUtils` logic. Closes gh-22703
spring-core/src/main/java/org/springframework/core/annotation/AnnotationTypeMapping.java
@@ -272,11 +272,11 @@ private void addConventionMappings() { private void addConventionAnnotationValues() { for (int i = 0; i < this.attributes.size(); i++) { Method attribute = this.attributes.get(i); + boolean isValueAttribute = MergedAnnotation.VALUE.equals(attribute.getName()); AnnotationTypeMapping ...
true
Other
spring-projects
spring-framework
800cbf2524c5548ddc259f62f30d1845801cd665.json
Ignore 'value' attribute in AnnotationTypeMapping Update `addConventionAnnotationValues` so that `value` attributes do not override existing annotation values. The aligns the new `MergedAnnotations` API with the previous `AnnotatedElementUtils` logic. Closes gh-22703
spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java
@@ -822,6 +822,14 @@ public void forAnnotationsCreatesCopyOfArrayOnEachCall() { assertThat(element.getDeclaredAnnotations()).isNotSameAs(element.getDeclaredAnnotations()); } + @Test // gh-22703 + public void getMergedAnnotationOnThreeDeepMetaWithValue() { + ValueAttribute annotation = AnnotatedElementUtils.getM...
true
Other
spring-projects
spring-framework
800cbf2524c5548ddc259f62f30d1845801cd665.json
Ignore 'value' attribute in AnnotationTypeMapping Update `addConventionAnnotationValues` so that `value` attributes do not override existing annotation values. The aligns the new `MergedAnnotations` API with the previous `AnnotatedElementUtils` logic. Closes gh-22703
spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java
@@ -2045,6 +2045,14 @@ public void getValueWhenHasDefaultOverrideWithExplicitAlias() { assertThat(annotation.getString("value")).isEqualTo("meta"); } + @Test // gh-22703 + public void getValueWhenThreeDeepMetaWithValue() { + MergedAnnotation<?> annotation = MergedAnnotations.from( + ValueAttributeMetaMetaCla...
true
Other
spring-projects
spring-framework
57d006b3ffd3c02729ebb3122b7f9e195eccf47c.json
Fix checkstyle warning
spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java
@@ -59,7 +59,7 @@ public abstract class DataBufferUtils { /** * Workaround to disable use of pooled buffers: - * https://github.com/reactor/reactor-core/issues/1634 + * https://github.com/reactor/reactor-core/issues/1634. */ private static final DataBufferFactory defaultDataBufferFactory = new DefaultData...
false
Other
spring-projects
spring-framework
2950958f35de1a6d5a265017c5111f640b9887aa.json
Fix ConcurrentModificationException on Undertow This commit fixes a ConcurrentModificationException that occurs when requesting a nonexistant route. Closes gh-22698
spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java
@@ -27,7 +27,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.Enumeration; import java.util.List; import java.util.Locale; import java.util.Map; @@ -372,11 +371,8 @@ public boolean containsKey(Object key) { @Override public void clear() { - Enumer...
false
Other
spring-projects
spring-framework
fedbb09ad900ab47dec2d15da90b3ba3ed4a67e6.json
Improve RouterFunctions reference documentation Changed WebFlux.fn docs to use router function builder. Issue: SPR-17016
src/docs/asciidoc/web/webflux-functional.adoc
@@ -1,7 +1,7 @@ [[webflux-fn]] = Functional Endpoints -Spring WebFlux includes a lightweight functional programming model in which functions +Spring WebFlux includes WebFlux.fn, a lightweight functional programming model in which functions are used to route and handle requests and contracts are designed for immuta...
false
Other
spring-projects
spring-framework
91de8d265e332ba378f191105592190d4f90bb48.json
Fix ProtobufDecoder handling of split message size This commit introduces a new readMessageSize(DataBuffer input) private method, inspired from CodedInputStream#readRawVarint32(int, InputStream) and adapted for DataBuffer using MessageDecoderFunction fields in order to support use cases where the message size is split...
spring-web/src/main/java/org/springframework/http/codec/protobuf/ProtobufDecoder.java
@@ -172,6 +172,8 @@ private class MessageDecoderFunction implements Function<DataBuffer, Iterable<? private int messageBytesToRead; + private int offset; + public MessageDecoderFunction(ResolvableType elementType, int maxMessageSize) { this.elementType = elementType; @@ -188,11 +190,9 @@ public Iterabl...
true
Other
spring-projects
spring-framework
91de8d265e332ba378f191105592190d4f90bb48.json
Fix ProtobufDecoder handling of split message size This commit introduces a new readMessageSize(DataBuffer input) private method, inspired from CodedInputStream#readRawVarint32(int, InputStream) and adapted for DataBuffer using MessageDecoderFunction fields in order to support use cases where the message size is split...
spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java
@@ -128,7 +128,9 @@ public void decode() { } @Test - public void decodeSplitChunks() throws IOException { + public void decodeSplitChunks() { + + Flux<DataBuffer> input = Flux.just(this.testMsg1, this.testMsg2) .flatMap(msg -> Mono.defer(() -> { DataBuffer buffer = this.bufferFactory.allocateBuffer(...
true
Other
spring-projects
spring-framework
17b2b8af868e97744b1e78c8f6181a8275402987.json
Remove an unnecessary local variable
spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfo.java
@@ -195,8 +195,7 @@ public RequestMappingInfo combine(RequestMappingInfo other) { @Nullable private String combineNames(RequestMappingInfo other) { if (this.name != null && other.name != null) { - String separator = "#"; - return this.name + separator + other.name; + return this.name + "#" + other.name; ...
false
Other
spring-projects
spring-framework
0134c9d608ab6cdef78c791e946a1a85aaacd476.json
Update @since version after backport
spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java
@@ -58,7 +58,7 @@ public interface HandlerMapping { /** * Name of the {@link HttpServletRequest} attribute that contains the mapped * handler for the best matching pattern. - * @since 5.1.3 + * @since 4.3.21 */ String BEST_MATCHING_HANDLER_ATTRIBUTE = HandlerMapping.class.getName() + ".bestMatchingHandle...
false
Other
spring-projects
spring-framework
d6a5c3428be0f2d011c042761e18f822ebb4aba0.json
Improve docs on STOMP / WebSocket frame max size Issue: SPR-17514
spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketTransportRegistration.java
@@ -47,20 +47,12 @@ public class WebSocketTransportRegistration { /** - * Configure the maximum size for an incoming sub-protocol message. - * For example a STOMP message may be received as multiple WebSocket messages - * or multiple HTTP POST requests when SockJS fallback options are in use. - * <p>In theory...
true
Other
spring-projects
spring-framework
d6a5c3428be0f2d011c042761e18f822ebb4aba0.json
Improve docs on STOMP / WebSocket frame max size Issue: SPR-17514
src/docs/asciidoc/web/websocket.adoc
@@ -1133,6 +1133,42 @@ application. +[[websocket-stomp-server-config]] +=== WebSocket Server + +To configure the underlying WebSocket server, the information in +<<websocket-server-runtime-configuration>> applies. For Jetty, however you need to set +the `HandshakeHandler` and `WebSocketPolicy` through the `StompE...
true
Other
spring-projects
spring-framework
fef0e21d8b938d2a5bce0fe9b1f38332458e7f45.json
Remove unused LinkedList import
spring-core/src/main/java/org/springframework/util/ReflectionUtils.java
@@ -25,7 +25,6 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; -import java.util.LinkedList; import java.util.List; import java.util.Map;
false
Other
spring-projects
spring-framework
02d3cfa42d1cae6d84dea559efa096a86fd2b611.json
Use ArrayList instead of LinkedList
spring-core/src/main/java/org/springframework/util/ReflectionUtils.java
@@ -697,7 +697,7 @@ private static List<Method> findConcreteMethodsOnInterfaces(Class<?> clazz) { for (Method ifcMethod : ifc.getMethods()) { if (!Modifier.isAbstract(ifcMethod.getModifiers())) { if (result == null) { - result = new LinkedList<>(); + result = new ArrayList<>(); } re...
false
Other
spring-projects
spring-framework
88cb126511779608d377b33793a8b00cfded7602.json
Add RequestPredicate Visitor to WebFlux.fn This commit introduces RequestPredicates.Visitor, an implementation of the visitor pattern for RequestPredicates. Issue: SPR-17322
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicate.java
@@ -84,4 +84,15 @@ default Optional<ServerRequest> nest(ServerRequest request) { return (test(request) ? Optional.of(request) : Optional.empty()); } + /** + * Accept the given visitor. Default implementation calls + * {@link RequestPredicates.Visitor#unknown(RequestPredicate)}; composed {@code RequestPredicate...
true
Other
spring-projects
spring-framework
88cb126511779608d377b33793a8b00cfded7602.json
Add RequestPredicate Visitor to WebFlux.fn This commit introduces RequestPredicates.Visitor, an implementation of the visitor pattern for RequestPredicates. Issue: SPR-17322
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java
@@ -41,12 +41,14 @@ import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpCookie; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.codec.HttpMessageReader;...
true
Other
spring-projects
spring-framework
88cb126511779608d377b33793a8b00cfded7602.json
Add RequestPredicate Visitor to WebFlux.fn This commit introduces RequestPredicates.Visitor, an implementation of the visitor pattern for RequestPredicates. Issue: SPR-17322
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunction.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -108,7 +108,7 @@ default <S extends ServerRe...
true
Other
spring-projects
spring-framework
88cb126511779608d377b33793a8b00cfded7602.json
Add RequestPredicate Visitor to WebFlux.fn This commit introduces RequestPredicates.Visitor, an implementation of the visitor pattern for RequestPredicates. Issue: SPR-17322
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ToStringVisitor.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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,11 +16,14 @@ package org.springframew...
true
Other
spring-projects
spring-framework
88cb126511779608d377b33793a8b00cfded7602.json
Add RequestPredicate Visitor to WebFlux.fn This commit introduces RequestPredicates.Visitor, an implementation of the visitor pattern for RequestPredicates. Issue: SPR-17322
spring-webflux/src/test/java/org/springframework/web/reactive/function/server/ToStringVisitorTests.java
@@ -0,0 +1,107 @@ +/* + * Copyright 2002-2018 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
f3c29fe2e6d2b1b1da4acc09d00bf2c67f10ff3e.json
Add test for UriUtils.encode(String, Charset) Issue: SPR-17451
spring-web/src/test/java/org/springframework/web/util/UriUtilsTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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,7 +16,6 @@ package org.springframewor...
false
Other
spring-projects
spring-framework
abf9ce8a34d8e386a36d265fc558ee21a02d5d16.json
Improve handling of empty response with Mono<T> Issue: SPR-17560
spring-web/src/main/java/org/springframework/http/codec/EncoderHttpMessageWriter.java
@@ -119,7 +119,10 @@ public Mono<Void> write(Publisher<? extends T> inputStream, ResolvableType eleme if (inputStream instanceof Mono) { HttpHeaders headers = message.getHeaders(); return Mono.from(body) - .defaultIfEmpty(message.bufferFactory().wrap(new byte[0])) + .switchIfEmpty(Mono.defer(() -> { ...
true
Other
spring-projects
spring-framework
abf9ce8a34d8e386a36d265fc558ee21a02d5d16.json
Improve handling of empty response with Mono<T> Issue: SPR-17560
spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java
@@ -34,23 +34,17 @@ import org.springframework.core.codec.Encoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; import org.springframework.http.MediaType; import org....
true
Other
spring-projects
spring-framework
abf9ce8a34d8e386a36d265fc558ee21a02d5d16.json
Improve handling of empty response with Mono<T> Issue: SPR-17560
spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java
@@ -149,6 +149,19 @@ public void personResponseBodyWithMono() throws Exception { assertEquals(expected, responseEntity.getBody()); } + @Test // SPR-17506 + public void personResponseBodyWithEmptyMono() throws Exception { + ResponseEntity<Person> responseEntity = performGet("/person-response/mono-empty", JSON, P...
true
Other
spring-projects
spring-framework
63275ae2b750af8d5ea78cc1f0395b536c8b0a55.json
Add Test for LeakAwareDataBufferFactory
spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBuffer.java
@@ -44,11 +44,14 @@ class LeakAwareDataBuffer implements PooledDataBuffer { Assert.notNull(dataBufferFactory, "DataBufferFactory must not be null"); this.delegate = delegate; this.dataBufferFactory = dataBufferFactory; - this.leakError = createLeakError(); + this.leakError = createLeakError(delegate); } ...
true
Other
spring-projects
spring-framework
63275ae2b750af8d5ea78cc1f0395b536c8b0a55.json
Add Test for LeakAwareDataBufferFactory
spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactory.java
@@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; +import org.jetbrains.annotations.NotNull; import org.junit.After; import org.springframework.util.Assert; @@ -74,17 +75,18 @@ public void checkForLeaks() { } @Override - public LeakAwareDataBuffer allocateBuffer() { - LeakAwareDataBuff...
true
Other
spring-projects
spring-framework
63275ae2b750af8d5ea78cc1f0395b536c8b0a55.json
Add Test for LeakAwareDataBufferFactory
spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java
@@ -0,0 +1,54 @@ +/* + * Copyright 2002-2018 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
1a37345e84698f57a2ef6a0dbffcbd306d1cd50a.json
Fix checkstyle violation and polish
spring-web/src/main/java/org/springframework/http/codec/protobuf/ProtobufDecoder.java
@@ -18,6 +18,7 @@ import java.io.IOException; import java.lang.reflect.Method; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -42,35 +43,36 @@ import org.springframework.util.MimeType; /** - * A {@code Decoder} that reads {@link com.google.protobuf.Me...
false
Other
spring-projects
spring-framework
9f857c1f16bf634ec2e595d74c0ad39ccaaff98b.json
Replace constant exceptions with inlined ones Issue: SRP-17475
spring-webflux/src/main/java/org/springframework/web/reactive/DispatcherHandler.java
@@ -142,16 +142,23 @@ protected void initStrategies(ApplicationContext context) { @Override public Mono<Void> handle(ServerWebExchange exchange) { if (this.handlerMappings == null) { - return Mono.error(HANDLER_NOT_FOUND_EXCEPTION); + return createNotFoundError(); } return Flux.fromIterable(this.handle...
true
Other
spring-projects
spring-framework
9f857c1f16bf634ec2e595d74c0ad39ccaaff98b.json
Replace constant exceptions with inlined ones Issue: SRP-17475
spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceWebHandler.java
@@ -88,8 +88,6 @@ public class ResourceWebHandler implements WebHandler, InitializingBean { private static final Set<HttpMethod> SUPPORTED_METHODS = EnumSet.of(HttpMethod.GET, HttpMethod.HEAD); - private static final Exception NOT_FOUND_EXCEPTION = new ResponseStatusException(HttpStatus.NOT_FOUND); - private st...
true
Other
spring-projects
spring-framework
9f857c1f16bf634ec2e595d74c0ad39ccaaff98b.json
Replace constant exceptions with inlined ones Issue: SRP-17475
spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java
@@ -19,6 +19,7 @@ import java.time.Duration; import java.util.Collections; import java.util.List; +import java.util.concurrent.atomic.AtomicReference; import org.junit.Before; import org.junit.Test; @@ -81,15 +82,19 @@ public void setup() { @Test public void noHandler() { MockServerWebExchange exchange = ...
true
Other
spring-projects
spring-framework
9f857c1f16bf634ec2e595d74c0ad39ccaaff98b.json
Replace constant exceptions with inlined ones Issue: SRP-17475
spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java
@@ -24,6 +24,7 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; import org.junit.Before; import org.junit.Test; @@ -274,6 +275,7 @@ public void testInvalidPath() throws Exception { private void testInvalidPath(Str...
true
Other
spring-projects
spring-framework
aa848d54ffa281165cf258ae020811b2d9b18fc7.json
Fix typo on javadoc `ForwardedHeaderFilter` instead of `ForwardedHeaderFiller`
spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java
@@ -169,7 +169,7 @@ private static ServletUriComponentsBuilder initFromRequest(HttpServletRequest re * * <p>As of 4.3.15, this method replaces the contextPath with the value * of "X-Forwarded-Prefix" rather than prepending, thus aligning with - * {@code ForwardedHeaderFiller}. + * {@code ForwardedHeaderFilte...
false
Other
spring-projects
spring-framework
2163fa94a7f0b8bf5de1398f0a79249f342f497c.json
Fix initialization issue in ReactorResourceFactory Follow-up on recent commit #d537a1c. Issue: SPR-17243
spring-web/src/main/java/org/springframework/http/client/reactive/ReactorResourceFactory.java
@@ -46,9 +46,9 @@ public class ReactorResourceFactory implements InitializingBean, DisposableBean private Consumer<HttpResources> globalResourcesConsumer; - private Supplier<ConnectionProvider> connectionProviderSupplier = () -> ConnectionProvider.elastic("http"); + private Supplier<ConnectionProvider> connection...
true
Other
spring-projects
spring-framework
2163fa94a7f0b8bf5de1398f0a79249f342f497c.json
Fix initialization issue in ReactorResourceFactory Follow-up on recent commit #d537a1c. Issue: SPR-17243
spring-web/src/test/java/org/springframework/http/client/reactive/ReactorResourceFactoryTests.java
@@ -0,0 +1,137 @@ +/* + * Copyright 2002-2018 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
3302798e2ff515205183f9a26a2aca8d92cc5352.json
Use random id for WebSocket sessions Issue: SPR-17228
spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSession.java
@@ -24,7 +24,9 @@ import org.apache.commons.logging.LogFactory; import org.springframework.lang.Nullable; +import org.springframework.util.AlternativeJdkIdGenerator; import org.springframework.util.Assert; +import org.springframework.util.IdGenerator; import org.springframework.web.socket.BinaryMessage; import o...
true
Other
spring-projects
spring-framework
3302798e2ff515205183f9a26a2aca8d92cc5352.json
Use random id for WebSocket sessions Issue: SPR-17228
spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSession.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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,6 @@ import org.springframework.l...
true
Other
spring-projects
spring-framework
3302798e2ff515205183f9a26a2aca8d92cc5352.json
Use random id for WebSocket sessions Issue: SPR-17228
spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSession.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -50,8 +50,7 @@ */ public class StandardWe...
true
Other
spring-projects
spring-framework
3302798e2ff515205183f9a26a2aca8d92cc5352.json
Use random id for WebSocket sessions Issue: SPR-17228
spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapterTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2018 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,6 +16,7 @@ package org.springframewor...
true
Other
spring-projects
spring-framework
f87a37fd0d9519d2b6a9efb4395acf9a1cf05bc8.json
Fix SpEL compilation for non trivial elvis operand Issue: SPR-17214
spring-expression/src/main/java/org/springframework/expression/spel/ast/Elvis.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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,10 +79,12 @@ public boolean isCompilable...
true
Other
spring-projects
spring-framework
f87a37fd0d9519d2b6a9efb4395acf9a1cf05bc8.json
Fix SpEL compilation for non trivial elvis operand Issue: SPR-17214
spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java
@@ -4898,6 +4898,71 @@ public void elvisOperator_SPR15192() { assertIsCompiled(exp); } + + @Test + public void elvisOperator_SPR17214() throws Exception { + SpelParserConfiguration spc = new SpelParserConfiguration(SpelCompilerMode.IMMEDIATE, null); + SpelExpressionParser sep = new SpelExpressionParser(spc); +...
true
Other
spring-projects
spring-framework
48c660fa41ec954a566ea1891018aa83fece9667.json
Add support for empty router in RouterFunctionDsl Issue: SPR-17247
spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt
@@ -546,7 +546,12 @@ open class RouterFunctionDsl(private val init: RouterFunctionDsl.() -> Unit) : ( */ override fun invoke(): RouterFunction<ServerResponse> { init() - return routes.reduce(RouterFunction<ServerResponse>::and) + return if (routes.isEmpty()) { + RouterFunction<ServerResponse> { Mono.empty()...
true
Other
spring-projects
spring-framework
48c660fa41ec954a566ea1891018aa83fece9667.json
Add support for empty router in RouterFunctionDsl Issue: SPR-17247
spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDslTests.kt
@@ -120,6 +120,11 @@ class RouterFunctionDslTests { .verifyComplete() } + @Test + fun emptyRouter() { + router { } + } + private fun sampleRouter() = router { (GET("/foo/") or GET("/foos/")) { req -> handle(req) }
true
Other
spring-projects
spring-framework
f8a0e3d08436f2ebe787c18d5744cfdd21aa9805.json
Support RenderingResponse in RouterFunctionDsl Issue: SPR-17244
spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt
@@ -21,6 +21,7 @@ import org.springframework.http.HttpMethod import org.springframework.http.HttpStatus import org.springframework.http.MediaType import reactor.core.publisher.Mono +import reactor.core.publisher.cast import java.net.URI /** @@ -153,8 +154,8 @@ open class RouterFunctionDsl(private val init: Route...
true
Other
spring-projects
spring-framework
f8a0e3d08436f2ebe787c18d5744cfdd21aa9805.json
Support RenderingResponse in RouterFunctionDsl Issue: SPR-17244
spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDslTests.kt
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -43,7 +43,7 @@ class RouterFunctionDslTests ...
true
Other
spring-projects
spring-framework
ab086f4225c6e39ad322c162d997981bc27ac5f8.json
Fix fragile tests for asynchronous events This commit introduces a dependency on the Awaitility assertion framework and makes use of asynchronous assertions in order to make tests for asynchronous events more robust. Issue: SPR-17211
spring-context/spring-context.gradle
@@ -28,6 +28,7 @@ dependencies { testCompile("org.codehaus.groovy:groovy-test:${groovyVersion}") testCompile("org.apache.commons:commons-pool2:2.6.0") testCompile("javax.inject:javax.inject-tck:1") + testCompile("org.awaitility:awaitility:3.1.2") testRuntime("javax.xml.bind:jaxb-api:2.3.0") testRuntime("org.g...
true
Other
spring-projects
spring-framework
ab086f4225c6e39ad322c162d997981bc27ac5f8.json
Fix fragile tests for asynchronous events This commit introduces a dependency on the Awaitility assertion framework and makes use of asynchronous assertions in order to make tests for asynchronous events more robust. Issue: SPR-17211
spring-context/src/test/java/org/springframework/context/support/SimpleThreadScopeTests.java
@@ -16,6 +16,9 @@ package org.springframework.context.support; +import java.util.concurrent.TimeUnit; + +import org.awaitility.Awaitility; import org.junit.Test; import org.springframework.context.ApplicationContext; @@ -45,26 +48,18 @@ public void getFromScope() throws Exception { @Test public void getM...
true
Other
spring-projects
spring-framework
ab086f4225c6e39ad322c162d997981bc27ac5f8.json
Fix fragile tests for asynchronous events This commit introduces a dependency on the Awaitility assertion framework and makes use of asynchronous assertions in order to make tests for asynchronous events more robust. Issue: SPR-17211
spring-context/src/test/java/org/springframework/scheduling/annotation/AsyncExecutionTests.java
@@ -24,9 +24,11 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; +import org.awaitilit...
true
Other
spring-projects
spring-framework
ab086f4225c6e39ad322c162d997981bc27ac5f8.json
Fix fragile tests for asynchronous events This commit introduces a dependency on the Awaitility assertion framework and makes use of asynchronous assertions in order to make tests for asynchronous events more robust. Issue: SPR-17211
spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java
@@ -25,7 +25,9 @@ import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import org.awaitility.Awaitility; import org.junit.Test; import org.mockito.Mockito; @@ -163,7 +165,7 @@ public void customAsyncAnnotationIs...
true
Other
spring-projects
spring-framework
ab086f4225c6e39ad322c162d997981bc27ac5f8.json
Fix fragile tests for asynchronous events This commit introduces a dependency on the Awaitility assertion framework and makes use of asynchronous assertions in order to make tests for asynchronous events more robust. Issue: SPR-17211
spring-context/src/test/java/org/springframework/scheduling/concurrent/AbstractSchedulingTaskExecutorTests.java
@@ -24,6 +24,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +import org.awaitility.Awaitility; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -113,10 +114,14 @@ public void submitRunnableWithGetAfterShutdown() throws Exception { @Test ...
true
Other
spring-projects
spring-framework
280da61d5c9594e6541725ea67af9dda1a5943a7.json
Fix empty body writing in EncoderHttpMessageWriter Prior to this commit, an bug introduced in SPR-16949 prevented `Mono.empty` bodies from being written to the response. This commit ensures that empty bodies still trigger the writing to the response and does not hang the processing of the exchange. Issue: SPR-17220
spring-web/src/main/java/org/springframework/http/codec/EncoderHttpMessageWriter.java
@@ -48,6 +48,7 @@ * @author Arjen Poutsma * @author Sebastien Deleuze * @author Rossen Stoyanchev + * @author Brian Clozel * @since 5.0 * @param <T> the type of objects in the input stream */ @@ -119,9 +120,10 @@ public Mono<Void> write(Publisher<? extends T> inputStream, ResolvableType eleme HttpHeader...
true
Other
spring-projects
spring-framework
280da61d5c9594e6541725ea67af9dda1a5943a7.json
Fix empty body writing in EncoderHttpMessageWriter Prior to this commit, an bug introduced in SPR-16949 prevented `Mono.empty` bodies from being written to the response. This commit ensures that empty bodies still trigger the writing to the response and does not hang the processing of the exchange. Issue: SPR-17220
spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java
@@ -16,6 +16,7 @@ package org.springframework.http.codec; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -28,8 +29,12 @@ import org.mockito.MockitoAnnotations; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; ...
true
Other
spring-projects
spring-framework
08ba53dd0e0206fcfd72658c58371ccbe5a1ffaa.json
Ensure SocketUtils can be instantiated Issue: SPR-17215
spring-core/src/test/java/org/springframework/util/SocketUtilsTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,14 @@ public class SocketUtilsTest...
false
Other
spring-projects
spring-framework
c55a9072aa7c95796d67b7322b3bed4c26890f60.json
Fix typo in CONTRIBUTING.md
CONTRIBUTING.md
@@ -76,7 +76,7 @@ Backports to prior versions will be considered on a case-by-case basis and refle the fix version in the issue tracker. 1. Use short branch names, preferably based on the JIRA issue (e.g. `SPR-1234`), or -otherwise using succinct, lower-case, dash (-) delimited names, such as `fix-warnings'. +other...
false
Other
spring-projects
spring-framework
8848e6ab9fe42495b250f87e23bd73ff84a6fb9d.json
Fix usage of deprecated functionality in docs Closes gh-1934
src/docs/asciidoc/web/websocket.adoc
@@ -1804,7 +1804,7 @@ user and associate it with subsequent STOMP messages on the same session: @Override public void configureClientInboundChannel(ChannelRegistration registration) { - registration.setInterceptors(new ChannelInterceptorAdapter() { + registration.interceptors(new ChannelInterceptor() { ...
false
Other
spring-projects
spring-framework
50a4769162061f2e16dca7176f8b431093f08a27.json
Fix ResourceUrlEncodingFilter lifecycle Prior to this commit, the `ResourceUrlEncodingFilter` would wrap the response and keep a reference to the request. When `HttpServletResponse.encodeURL` is later called during view rendering, the filter looks at the request and extracts context mapping information in order to res...
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilter.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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 javax.servlet.Servlet...
true
Other
spring-projects
spring-framework
50a4769162061f2e16dca7176f8b431093f08a27.json
Fix ResourceUrlEncodingFilter lifecycle Prior to this commit, the `ResourceUrlEncodingFilter` would wrap the response and keep a reference to the request. When `HttpServletResponse.encodeURL` is later called during view rendering, the filter looks at the request and extracts context mapping information in order to res...
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilterTests.java
@@ -69,10 +69,10 @@ private ResourceUrlProvider createResourceUrlProvider(List<ResourceResolver> res @Test public void encodeURL() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/"); - request.setAttribute(ResourceUrlProviderExposingInterceptor.RESOURCE_URL_PROVIDER_ATTR,...
true
Other
spring-projects
spring-framework
50a4769162061f2e16dca7176f8b431093f08a27.json
Fix ResourceUrlEncodingFilter lifecycle Prior to this commit, the `ResourceUrlEncodingFilter` would wrap the response and keep a reference to the request. When `HttpServletResponse.encodeURL` is later called during view rendering, the filter looks at the request and extracts context mapping information in order to res...
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderJavaConfigTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2018 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. @@ -55,8 +55,6 @@ public class ResourceUrlProvi...
true
Other
spring-projects
spring-framework
611019b73ca1f8edc83d5a2961267655002c3ab7.json
Fix memory leak for Jaxb2XmlEncoder This commit fixes a memory leak in Jaxb2XmlEncoder that occurs when the input stream contains an error. Test added as well. Issue: SPR-17419
spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlEncoder.java
@@ -34,6 +34,7 @@ import org.springframework.core.codec.Hints; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; +import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.log.LogFormatUtils; import org.springframewor...
true
Other
spring-projects
spring-framework
611019b73ca1f8edc83d5a2961267655002c3ab7.json
Fix memory leak for Jaxb2XmlEncoder This commit fixes a memory leak in Jaxb2XmlEncoder that occurs when the input stream contains an error. Test added as well. Issue: SPR-17419
spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java
@@ -20,6 +20,9 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlRootElement; import org.junit.Test; import reactor.core.publisher.Flux; @@ -34,15 +37,9...
true
Other
spring-projects
spring-framework
2439f87a48554baed2de64afad8d3bdd7a7de37b.json
Add onDiscard hook to Jetty client request The flatMap operation in writeAndFlushWith could buffer internally. Issue: SPR-17424
spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpRequest.java
@@ -33,6 +33,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.core.io.buffer.PooledDataBuffer; import org.springframework.http.HttpHeaders; import org.spring...
false
Other
spring-projects
spring-framework
feeec344e530aeb32c0d9d36588b7fb821ac0e9e.json
ForwardedHeaderFilter works with Servlet FORWARD Issue: SPR-16983
spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java
@@ -23,6 +23,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; +import java.util.function.Supplier; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -219,11 +220,7 @@ private static class ForwardedHeaderExtractingRequ...
true
Other
spring-projects
spring-framework
feeec344e530aeb32c0d9d36588b7fb821ac0e9e.json
ForwardedHeaderFilter works with Servlet FORWARD Issue: SPR-16983
spring-web/src/test/java/org/springframework/web/filter/ForwardedHeaderFilterTests.java
@@ -17,7 +17,9 @@ package org.springframework.web.filter; import java.io.IOException; +import java.net.URI; import java.util.Enumeration; +import javax.servlet.DispatcherType; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.ServletException; @@ -308,6 +310,28 @@ public void f...
true
Other
spring-projects
spring-framework
946ec7e22e114e297bc099c89cac1ab5ead9cbb4.json
Fix memory leaks in ProtobufDecoder Issue: SPR-17418
spring-core/src/test/java/org/springframework/core/io/buffer/AbstractDataBufferAllocatingTestCase.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -66,9 +66,12 @@ protected DataBuffer createD...
true
Other
spring-projects
spring-framework
946ec7e22e114e297bc099c89cac1ab5ead9cbb4.json
Fix memory leaks in ProtobufDecoder Issue: SPR-17418
spring-web/src/main/java/org/springframework/http/codec/protobuf/ProtobufDecoder.java
@@ -216,12 +216,18 @@ public Iterable<? extends Message> apply(DataBuffer input) { } while (remainingBytesToRead > 0); return messages; } + catch (DecodingException ex) { + throw ex; + } catch (IOException ex) { throw new DecodingException("I/O error while parsing input stream", ex); }...
true
Other
spring-projects
spring-framework
946ec7e22e114e297bc099c89cac1ab5ead9cbb4.json
Fix memory leaks in ProtobufDecoder Issue: SPR-17418
spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java
@@ -36,8 +36,7 @@ import org.springframework.util.MimeType; import static java.util.Collections.emptyMap; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; import static org.springframework.core.ResolvableType.forClass; /** @@ -81,7 +80,7...
true
Other
spring-projects
spring-framework
f738273486204becf7bce1f25df9bf6d6d8b0507.json
Fix buffering issue in StringDecoder Issue: SPR-17418
spring-core/src/main/java/org/springframework/core/codec/StringDecoder.java
@@ -33,6 +33,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBufferFactory; +import org.springframework.core.io.buffer.PooledDataBuffer; import org.springframework.core.log.LogFormatUtils; imp...
true
Other
spring-projects
spring-framework
f738273486204becf7bce1f25df9bf6d6d8b0507.json
Fix buffering issue in StringDecoder Issue: SPR-17418
spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java
@@ -176,8 +176,9 @@ public void decodeEmptyDataBuffer() { @Test public void decodeError() { DataBuffer fooBuffer = stringBuffer("foo\n"); + DataBuffer barBuffer = stringBuffer("bar"); Flux<DataBuffer> source = - Flux.just(fooBuffer).concatWith(Flux.error(new RuntimeException())); + Flux.just(fooBuffer,...
true