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
85262a7932eaafc466dbb805366811da5e91b23b.json
Fix Map.put contract for HeadersAdapter impl. This commit fixes the `Map.put` contract for both Reactor Netty and Tomcat specific `HeadersAdapter` implementations. Issue: SPR-17415
spring-web/src/main/java/org/springframework/http/server/reactive/NettyHeadersAdapter.java
@@ -124,7 +124,7 @@ public List<String> get(Object key) { @Override public List<String> put(String key, @Nullable List<String> value) { List<String> previousValues = this.headers.getAll(key); - this.headers.add(key, value); + this.headers.set(key, value); return previousValues; }
true
Other
spring-projects
spring-framework
85262a7932eaafc466dbb805366811da5e91b23b.json
Fix Map.put contract for HeadersAdapter impl. This commit fixes the `Map.put` contract for both Reactor Netty and Tomcat specific `HeadersAdapter` implementations. Issue: SPR-17415
spring-web/src/main/java/org/springframework/http/server/reactive/TomcatHeadersAdapter.java
@@ -138,6 +138,7 @@ public List<String> get(Object key) { @Nullable public List<String> put(String key, List<String> value) { List<String> previousValues = get(key); + this.headers.removeHeader(key); value.forEach(v -> this.headers.addValue(key).setString(v)); return previousValues; }
true
Other
spring-projects
spring-framework
85262a7932eaafc466dbb805366811da5e91b23b.json
Fix Map.put contract for HeadersAdapter impl. This commit fixes the `Map.put` contract for both Reactor Netty and Tomcat specific `HeadersAdapter` implementations. Issue: SPR-17415
spring-web/src/test/java/org/springframework/http/server/reactive/HeadersAdaptersTests.java
@@ -16,12 +16,14 @@ package org.springframework.http.server.reactive; +import java.util.Arrays; import java.util.Locale; import io.netty.handler.codec.http.DefaultHttpHeaders; import io.undertow.util.HeaderMap; import org.apache.tomcat.util.http.MimeHeaders; import org.eclipse.jetty.http.HttpFields; +import...
true
Other
spring-projects
spring-framework
857b6006758e2509d6108a104735382ed0e9010d.json
Fix memory leak in AbstractJackson2Encoder Fixes a DataBuffer memory leak where a created buffer was not release if Jackson threw an exception.
spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Encoder.java
@@ -44,6 +44,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...
false
Other
spring-projects
spring-framework
ab8310b5f37df0e1e86595acec05aff402c8f574.json
Fix HeadersAdapters implementations This commit harmonizes the `HeadersAdapter` implementations across all supported servers with regards to the `get(Object key)` contract; some server implementations are not sticking to a `Map`-like contract and return empty `List` instead of `null` when a header is not present. Thi...
spring-web/src/main/java/org/springframework/http/server/reactive/JettyHeadersAdapter.java
@@ -114,7 +114,7 @@ public boolean containsValue(Object value) { @Nullable @Override public List<String> get(Object key) { - if (key instanceof String) { + if (containsKey(key)) { return this.headers.getValuesList((String) key); } return null;
true
Other
spring-projects
spring-framework
ab8310b5f37df0e1e86595acec05aff402c8f574.json
Fix HeadersAdapters implementations This commit harmonizes the `HeadersAdapter` implementations across all supported servers with regards to the `get(Object key)` contract; some server implementations are not sticking to a `Map`-like contract and return empty `List` instead of `null` when a header is not present. Thi...
spring-web/src/main/java/org/springframework/http/server/reactive/NettyHeadersAdapter.java
@@ -91,7 +91,7 @@ public Map<String, String> toSingleValueMap() { @Override public int size() { - return this.headers.size(); + return this.headers.names().size(); } @Override @@ -114,7 +114,7 @@ public boolean containsValue(Object value) { @Override @Nullable public List<String> get(Object key) { -...
true
Other
spring-projects
spring-framework
ab8310b5f37df0e1e86595acec05aff402c8f574.json
Fix HeadersAdapters implementations This commit harmonizes the `HeadersAdapter` implementations across all supported servers with regards to the `get(Object key)` contract; some server implementations are not sticking to a `Map`-like contract and return empty `List` instead of `null` when a header is not present. Thi...
spring-web/src/main/java/org/springframework/http/server/reactive/TomcatHeadersAdapter.java
@@ -128,7 +128,7 @@ public boolean containsValue(Object value) { @Override @Nullable public List<String> get(Object key) { - if (key instanceof String) { + if (containsKey(key)) { return Collections.list(this.headers.values((String) key)); } return null;
true
Other
spring-projects
spring-framework
ab8310b5f37df0e1e86595acec05aff402c8f574.json
Fix HeadersAdapters implementations This commit harmonizes the `HeadersAdapter` implementations across all supported servers with regards to the `get(Object key)` contract; some server implementations are not sticking to a `Map`-like contract and return empty `List` instead of `null` when a header is not present. Thi...
spring-web/src/test/java/org/springframework/http/server/reactive/HeadersAdaptersTests.java
@@ -0,0 +1,99 @@ +/* + * 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
fdaceeb6c97ae166a9c09f00678383b266dfe2e3.json
Remove checks and updates to transfer-encoding Issue: SPR-17393
spring-web/src/main/java/org/springframework/http/codec/EncoderHttpMessageWriter.java
@@ -118,7 +118,7 @@ public Mono<Void> write(Publisher<? extends T> inputStream, ResolvableType eleme if (inputStream instanceof Mono) { HttpHeaders headers = message.getHeaders(); - if (headers.getContentLength() < 0 && !headers.containsKey(HttpHeaders.TRANSFER_ENCODING)) { + if (headers.getFirst(HttpHeade...
true
Other
spring-projects
spring-framework
fdaceeb6c97ae166a9c09f00678383b266dfe2e3.json
Remove checks and updates to transfer-encoding Issue: SPR-17393
spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpResponse.java
@@ -19,7 +19,6 @@ import java.nio.file.Path; import io.netty.buffer.ByteBuf; -import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.codec.http.cookie.Cookie; import io.netty.handler.codec.http.cookie.DefaultCookie; @@ -49,16 +48,11 @@ c...
true
Other
spring-projects
spring-framework
e14cf699c8926f219d5a91cdfa0fd25ebf6b8b6d.json
Remove unused dependencies from spring-messaging Tomcat and Jetty integration tests were moved out of spring-messaging a very long time ago (before 4.0), but the dependencies remained unnoticed until now.
spring-messaging/spring-messaging.gradle
@@ -14,10 +14,6 @@ dependencies { optional(project(":spring-context")) optional(project(":spring-oxm")) optional("io.projectreactor.netty:reactor-netty") - optional("org.eclipse.jetty.websocket:websocket-server") { - exclude group: "javax.servlet", module: "javax.servlet-api" - } - optional("org.eclipse.jetty.we...
false
Other
spring-projects
spring-framework
2255d222e311ade8813308626ea2da954c7825c0.json
Fix punctuation in reference manual (#1992)
src/docs/asciidoc/web/webflux.adoc
@@ -161,7 +161,7 @@ re-use knowledge while also selecting the right tool for the right job. * A simple way to evaluate an application is to check its dependencies. If you have blocking persistence APIs (JPA, JDBC) or networking APIs to use, Spring MVC is the best choice -for common architectures at, least. It is te...
false
Other
spring-projects
spring-framework
8df0bc88d2f9f662919881ed3081f133656e37c8.json
Improve access to raw content in WebTestClient If the content has not been consumed, cause it to be produced, and wait for a certain amount of time before giving up, so the raw content can be made available. This can occur when: 1) In a mock server scenario the Flux representing the client request content is passed d...
spring-test/src/main/java/org/springframework/test/web/reactive/server/DefaultWebTestClient.java
@@ -300,7 +300,7 @@ private static class DefaultResponseSpec implements ResponseSpec { DefaultResponseSpec(WiretapConnector.Info wiretapInfo, ClientResponse response, @Nullable String uriTemplate, Duration timeout) { - this.exchangeResult = wiretapInfo.createExchangeResult(uriTemplate); + this.exchangeRes...
true
Other
spring-projects
spring-framework
8df0bc88d2f9f662919881ed3081f133656e37c8.json
Improve access to raw content in WebTestClient If the content has not been consumed, cause it to be produced, and wait for a certain amount of time before giving up, so the raw content can be made available. This can occur when: 1) In a mock server scenario the Flux representing the client request content is passed d...
spring-test/src/main/java/org/springframework/test/web/reactive/server/ExchangeResult.java
@@ -24,7 +24,7 @@ import java.util.List; import java.util.stream.Collectors; -import reactor.core.publisher.MonoProcessor; +import reactor.core.publisher.Mono; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; @@ -36,7 +36,6 @@ import org.springframework.lang.Nullable; i...
true
Other
spring-projects
spring-framework
8df0bc88d2f9f662919881ed3081f133656e37c8.json
Improve access to raw content in WebTestClient If the content has not been consumed, cause it to be produced, and wait for a certain amount of time before giving up, so the raw content can be made available. This can occur when: 1) In a mock server scenario the Flux representing the client request content is passed d...
spring-test/src/main/java/org/springframework/test/web/reactive/server/FluxExchangeResult.java
@@ -16,13 +16,9 @@ package org.springframework.test.web.reactive.server; -import java.time.Duration; import java.util.function.Consumer; import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -import org.springframework.lang.Nullable; /** * {@code ExchangeResult} variant with the respo...
true
Other
spring-projects
spring-framework
8df0bc88d2f9f662919881ed3081f133656e37c8.json
Improve access to raw content in WebTestClient If the content has not been consumed, cause it to be produced, and wait for a certain amount of time before giving up, so the raw content can be made available. This can occur when: 1) In a mock server scenario the Flux representing the client request content is passed d...
spring-test/src/main/java/org/springframework/test/web/reactive/server/WiretapConnector.java
@@ -17,12 +17,14 @@ package org.springframework.test.web.reactive.server; import java.net.URI; +import java.time.Duration; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import org.reactivestreams.Pu...
true
Other
spring-projects
spring-framework
8df0bc88d2f9f662919881ed3081f133656e37c8.json
Improve access to raw content in WebTestClient If the content has not been consumed, cause it to be produced, and wait for a certain amount of time before giving up, so the raw content can be made available. This can occur when: 1) In a mock server scenario the Flux representing the client request content is passed d...
spring-test/src/test/java/org/springframework/test/web/reactive/server/HeaderAssertionTests.java
@@ -17,6 +17,7 @@ package org.springframework.test.web.reactive.server; import java.net.URI; +import java.time.Duration; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.concurrent.TimeUnit; @@ -257,7 +258,7 @@ private HeaderAssertions headerAssertions(HttpHeaders responseHeaders) { M...
true
Other
spring-projects
spring-framework
8df0bc88d2f9f662919881ed3081f133656e37c8.json
Improve access to raw content in WebTestClient If the content has not been consumed, cause it to be produced, and wait for a certain amount of time before giving up, so the raw content can be made available. This can occur when: 1) In a mock server scenario the Flux representing the client request content is passed d...
spring-test/src/test/java/org/springframework/test/web/reactive/server/MockServerTests.java
@@ -18,17 +18,19 @@ import java.util.Arrays; import org.junit.Test; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.HttpHeaders; i...
true
Other
spring-projects
spring-framework
8df0bc88d2f9f662919881ed3081f133656e37c8.json
Improve access to raw content in WebTestClient If the content has not been consumed, cause it to be produced, and wait for a certain amount of time before giving up, so the raw content can be made available. This can occur when: 1) In a mock server scenario the Flux representing the client request content is passed d...
spring-test/src/test/java/org/springframework/test/web/reactive/server/StatusAssertionTests.java
@@ -17,6 +17,7 @@ package org.springframework.test.web.reactive.server; import java.net.URI; +import java.time.Duration; import org.junit.Test; import reactor.core.publisher.MonoProcessor; @@ -182,7 +183,7 @@ private StatusAssertions statusAssertions(HttpStatus status) { MonoProcessor<byte[]> emptyContent = ...
true
Other
spring-projects
spring-framework
8df0bc88d2f9f662919881ed3081f133656e37c8.json
Improve access to raw content in WebTestClient If the content has not been consumed, cause it to be produced, and wait for a certain amount of time before giving up, so the raw content can be made available. This can occur when: 1) In a mock server scenario the Flux representing the client request content is passed d...
spring-test/src/test/java/org/springframework/test/web/reactive/server/WiretapConnectorTests.java
@@ -17,6 +17,7 @@ package org.springframework.test.web.reactive.server; import java.net.URI; +import java.time.Duration; import org.junit.Test; import reactor.core.publisher.Mono; @@ -57,7 +58,7 @@ public void captureAndClaim() { function.exchange(clientRequest).block(ofMillis(0)); WiretapConnector.Info...
true
Other
spring-projects
spring-framework
8df0bc88d2f9f662919881ed3081f133656e37c8.json
Improve access to raw content in WebTestClient If the content has not been consumed, cause it to be produced, and wait for a certain amount of time before giving up, so the raw content can be made available. This can occur when: 1) In a mock server scenario the Flux representing the client request content is passed d...
spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/ErrorTests.java
@@ -16,13 +16,21 @@ package org.springframework.test.web.reactive.server.samples; +import java.nio.charset.StandardCharsets; + import org.junit.Test; import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.test.web.reactive.server.EntityExchangeResult...
true
Other
spring-projects
spring-framework
59e87f950b892b43e549c52b9b7cf05959072355.json
Fix heading levels in Reference Manual
src/docs/asciidoc/data-access-appendix.adoc
@@ -19,13 +19,12 @@ The `tx` tags deal with configuring all of those beans in Spring's comprehensive for transactions. These tags are covered in the chapter entitled <<data-access.adoc#transaction,Transaction Management>>. -TIP: We strongly encourag you to look at the `'spring-tx.xsd'` file that ships with the +TIP...
true
Other
spring-projects
spring-framework
59e87f950b892b43e549c52b9b7cf05959072355.json
Fix heading levels in Reference Manual
src/docs/asciidoc/data-access.adoc
@@ -2321,7 +2321,7 @@ tedious API. [[jdbc-choose-style]] -==== Choosing an Approach for JDBC Database Access +=== Choosing an Approach for JDBC Database Access You can choose among several approaches to form the basis for your JDBC database access. In addition to three flavors of `JdbcTemplate`, a new `SimpleJ...
true
Other
spring-projects
spring-framework
59e87f950b892b43e549c52b9b7cf05959072355.json
Fix heading levels in Reference Manual
src/docs/asciidoc/web/webflux.adoc
@@ -18,7 +18,7 @@ for example, Spring MVC controllers with the reactive `WebClient`. [[webflux-new-framework]] -=== Motivation +== Motivation Why was Spring WebFlux created? @@ -41,7 +41,7 @@ WebFlux to offer functional web endpoints alongside annotated controllers. [[webflux-why-reactive]] -=== Define "...
true
Other
spring-projects
spring-framework
f7263abbf0df4950d19fd59236c7a61be6d6f77a.json
Fix broken links in Testing chapter
src/docs/asciidoc/testing-webtestclient.adoc
@@ -1,7 +1,7 @@ [[webtestclient]] = WebTestClient -`WebTestClient` is a thin shell around <<web-reactive.adoc#webflux-webclient, WebClient>>, +`WebTestClient` is a thin shell around <<web-reactive.adoc#webflux-client, WebClient>>, using it to perform requests and exposing a dedicated, fluent API for verifying resp...
true
Other
spring-projects
spring-framework
f7263abbf0df4950d19fd59236c7a61be6d6f77a.json
Fix broken links in Testing chapter
src/docs/asciidoc/testing.adoc
@@ -1264,7 +1264,7 @@ programming model in JUnit 5): * <<integration-testing-annotations-junit-jupiter-springjunitconfig>> * <<integration-testing-annotations-junit-jupiter-springjunitwebconfig>> * <<integration-testing-annotations-junit-jupiter-enabledif>> -* <<integration-testing-annotations-junit-jupiter=-disable...
true
Other
spring-projects
spring-framework
3f5a7bbf049ff63f0f7b7c99925442efae6af636.json
Remove snapshot repository from build setup
build.gradle
@@ -148,7 +148,6 @@ configure(allprojects) { project -> repositories { maven { url "https://repo.spring.io/libs-release" } - maven { url "https://repo.spring.io/libs-snapshot" } // for Reactor } dependencies {
false
Other
spring-projects
spring-framework
745aeda581fc555831219aa3e16a24927c5d2c82.json
Fix typos in testing sections of Reference Manual
src/docs/asciidoc/testing-webtestclient.adoc
@@ -44,7 +44,7 @@ on the builder to customize the default WebFlux Java configuration. [[webtestclient-fn-config]] === Bind to Router Function -The folloiwng example shows how to set up a server from a +The following example shows how to set up a server from a <<web-reactive.adoc#webflux-fn,RouterFunction>>: ===...
true
Other
spring-projects
spring-framework
745aeda581fc555831219aa3e16a24927c5d2c82.json
Fix typos in testing sections of Reference Manual
src/docs/asciidoc/testing.adoc
@@ -190,7 +190,7 @@ Framework>> instead. [[integration-testing]] == Integration Testing -This section covers (most of the rest of this chapter) covers integration testing for +This section (most of the rest of this chapter) covers integration testing for Spring applications. It includes the following topics: * ...
true
Other
spring-projects
spring-framework
88ab911cf1d712b00167f64c17b714a4822a0e32.json
Provide matched pattern information in WebFlux fn This commit stores the first matching path pattern in the attribute `RouterFunctions.MATCHING_PATTERN_ATTRIBUTE`. Issue: SPR-17098
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java
@@ -30,6 +30,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; import java.util.function.Predicate; @@ -355,6 +356,31 @@ private static void restoreAttributes(ServerRequest request, Map<String, Object> ...
true
Other
spring-projects
spring-framework
88ab911cf1d712b00167f64c17b714a4822a0e32.json
Provide matched pattern information in WebFlux fn This commit stores the first matching path pattern in the attribute `RouterFunctions.MATCHING_PATTERN_ATTRIBUTE`. Issue: SPR-17098
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctions.java
@@ -16,8 +16,6 @@ package org.springframework.web.reactive.function.server; -import java.util.Collections; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.function.BiFunction; @@ -71,6 +69,14 @@ public abstract class RouterFunctions { public static final String U...
true
Other
spring-projects
spring-framework
88ab911cf1d712b00167f64c17b714a4822a0e32.json
Provide matched pattern information in WebFlux fn This commit stores the first matching path pattern in the attribute `RouterFunctions.MATCHING_PATTERN_ATTRIBUTE`. Issue: SPR-17098
spring-webflux/src/test/java/org/springframework/web/reactive/function/server/NestedRouteIntegrationTests.java
@@ -19,6 +19,7 @@ import java.util.Map; import org.junit.Test; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import org.springframework.http.HttpMethod; @@ -46,8 +47,8 @@ public class NestedRouteIntegrationTests extends AbstractRouterFunctionIntegrati protected RouterFunction<?> rou...
true
Other
spring-projects
spring-framework
cc87fbcb7fba7c4f630842d5f88692ae1228a7b3.json
Fix javadoc comments to match behaviour
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java
@@ -88,7 +88,7 @@ * </tr> * <tr class="altColor"> * <td><p>MissingServletRequestParameterException</p></td> - * <td><p>500 (SC_INTERNAL_SERVER_ERROR)</p></td> + * <td><p>400 (SC_BAD_REQUEST)</p></td> * </tr> * <tr class="rowColor"> * <td><p>ServletRequestBindingException</p></td> @@ -364,7 +364,8 @@ protect...
false
Other
spring-projects
spring-framework
12240c7524ee81deab6049dbfa59b5963f4ff2e7.json
Apply formatValue to a few remaining places Issue: SPR-17254
spring-web/src/main/java/org/springframework/http/codec/FormHttpMessageWriter.java
@@ -134,7 +134,8 @@ public Mono<Void> write(Publisher<? extends MultiValueMap<String, String>> input if (logger.isDebugEnabled()) { String s = Hints.getLogPrefix(hints) + "Writing " + (isEnableLoggingRequestDetails() ? - form.toString() : "form fields " + form.keySet() + " (content masked)"); + ...
true
Other
spring-projects
spring-framework
12240c7524ee81deab6049dbfa59b5963f4ff2e7.json
Apply formatValue to a few remaining places Issue: SPR-17254
spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartHttpMessageReader.java
@@ -97,7 +97,8 @@ public Mono<MultiValueMap<String, Part>> readMono(ResolvableType elementType, if (logger.isDebugEnabled()) { String s = Hints.getLogPrefix(hints) + "Parsed " + (isEnableLoggingRequestDetails() ? - map.toString() : "parts " + map.keySet() + " (content masked)"); + ...
true
Other
spring-projects
spring-framework
12240c7524ee81deab6049dbfa59b5963f4ff2e7.json
Apply formatValue to a few remaining places Issue: SPR-17254
spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriter.java
@@ -228,7 +228,8 @@ private Mono<Void> writeMultipart( if (logger.isDebugEnabled()) { String s = Hints.getLogPrefix(hints) + "Encoding " + (isEnableLoggingRequestDetails() ? - map.toString() : "parts " + map.keySet() + " (content masked)"); + formatValue(map, logger.isTraceEnabled()) : + ...
true
Other
spring-projects
spring-framework
12240c7524ee81deab6049dbfa59b5963f4ff2e7.json
Apply formatValue to a few remaining places Issue: SPR-17254
spring-web/src/main/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReader.java
@@ -96,8 +96,10 @@ public Flux<Part> read(ResolvableType elementType, ReactiveHttpInputMessage mess return Flux.create(new SynchronossPartGenerator(message, this.bufferFactory, this.streamStorageFactory)) .doOnNext(part -> { if (logger.isDebugEnabled() && !Hints.isLoggingSuppressed(hints)) { - String...
true
Other
spring-projects
spring-framework
068565172e5d95f971dd6ee9a126d148d8ea028d.json
Add a BeanFactory#getBeanProvider Kotlin extension Issue: SPR-17274
spring-beans/src/main/kotlin/org/springframework/beans/factory/BeanFactoryExtensions.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. @@ -16,6 +16,9 @@ package org.springframewor...
true
Other
spring-projects
spring-framework
068565172e5d95f971dd6ee9a126d148d8ea028d.json
Add a BeanFactory#getBeanProvider Kotlin extension Issue: SPR-17274
spring-beans/src/test/kotlin/org/springframework/beans/factory/BeanFactoryExtensionsTests.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. @@ -19,9 +19,11 @@ package org.springframework....
true
Other
spring-projects
spring-framework
43a814b070c73b0d36701080cebfbc22ff8a9bc4.json
Remove duplicate assertions in AsyncExecutionTests
spring-context/src/test/java/org/springframework/scheduling/annotation/AsyncExecutionTests.java
@@ -381,7 +381,6 @@ public void asyncMethodListener() throws Exception { .atMost(1, TimeUnit.SECONDS) .pollInterval(10, TimeUnit.MILLISECONDS) .until(() -> listenerCalled == 1); - assertEquals(listenerCalled, 1); context.close(); } @@ -403,7 +402,6 @@ public void asyncClassListener() throws Ex...
false
Other
spring-projects
spring-framework
09af706af6857d67708071703c515b3554b2576a.json
Use concatWith instead of mergeWith
spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java
@@ -69,7 +69,7 @@ public void decode() { public void decodeError() { DataBuffer fooBuffer = stringBuffer("foo"); Flux<DataBuffer> source = - Flux.just(fooBuffer).mergeWith(Flux.error(new RuntimeException())); + Flux.just(fooBuffer).concatWith(Flux.error(new RuntimeException())); Flux<byte[]> output = t...
true
Other
spring-projects
spring-framework
09af706af6857d67708071703c515b3554b2576a.json
Use concatWith instead of mergeWith
spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java
@@ -68,7 +68,7 @@ public void decode() { public void decodeError() { DataBuffer fooBuffer = stringBuffer("foo"); Flux<DataBuffer> source = - Flux.just(fooBuffer).mergeWith(Flux.error(new RuntimeException())); + Flux.just(fooBuffer).concatWith(Flux.error(new RuntimeException())); Flux<ByteBuffer> output...
true
Other
spring-projects
spring-framework
09af706af6857d67708071703c515b3554b2576a.json
Use concatWith instead of mergeWith
spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java
@@ -77,7 +77,7 @@ public void decode() { public void decodeError() { DataBuffer fooBuffer = stringBuffer("foo"); Flux<DataBuffer> source = - Flux.just(fooBuffer).mergeWith(Flux.error(new RuntimeException())); + Flux.just(fooBuffer).concatWith(Flux.error(new RuntimeException())); Flux<Resource> resu...
true
Other
spring-projects
spring-framework
09af706af6857d67708071703c515b3554b2576a.json
Use concatWith instead of mergeWith
spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java
@@ -177,7 +177,7 @@ public void decodeEmptyDataBuffer() { public void decodeError() { DataBuffer fooBuffer = stringBuffer("foo\n"); Flux<DataBuffer> source = - Flux.just(fooBuffer).mergeWith(Flux.error(new RuntimeException())); + Flux.just(fooBuffer).concatWith(Flux.error(new RuntimeException())); Fl...
true
Other
spring-projects
spring-framework
09af706af6857d67708071703c515b3554b2576a.json
Use concatWith instead of mergeWith
spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java
@@ -106,7 +106,7 @@ public void readFormAsFlux() { public void readFormError() { DataBuffer fooBuffer = stringBuffer("name=value"); Flux<DataBuffer> body = - Flux.just(fooBuffer).mergeWith(Flux.error(new RuntimeException())); + Flux.just(fooBuffer).concatWith(Flux.error(new RuntimeException())); MockSe...
true
Other
spring-projects
spring-framework
09af706af6857d67708071703c515b3554b2576a.json
Use concatWith instead of mergeWith
spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java
@@ -176,7 +176,7 @@ public void readError() { Flux<DataBuffer> body = Flux.just(stringBuffer("data:foo\ndata:bar\n\ndata:baz\n\n")) - .mergeWith(Flux.error(new RuntimeException())); + .concatWith(Flux.error(new RuntimeException())); MockServerHttpRequest request = MockServerHttpRequest.post("/"...
true
Other
spring-projects
spring-framework
2b65d0e51ff106270871455880e2b1cf427eea1b.json
Fix error when writing empty String to DataBuffer Prior to this commit, `DataBuffer.write` would throw an `IllegalStateException` when called with an empty `String`, since the `CharsetEncoder` would be flushed on an incorrent state. This commit skips entirely the encoding phase for empty `String`. Fixes #22262
spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java
@@ -246,30 +246,32 @@ default DataBuffer ensureCapacity(int capacity) { default DataBuffer write(CharSequence charSequence, Charset charset) { Assert.notNull(charSequence, "CharSequence must not be null"); Assert.notNull(charset, "Charset must not be null"); - CharsetEncoder charsetEncoder = charset.newEncoder...
true
Other
spring-projects
spring-framework
2b65d0e51ff106270871455880e2b1cf427eea1b.json
Fix error when writing empty String to DataBuffer Prior to this commit, `DataBuffer.write` would throw an `IllegalStateException` when called with an empty `String`, since the `CharsetEncoder` would be flushed on an incorrent state. This commit skips entirely the encoding phase for empty `String`. Fixes #22262
spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.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. @@ -179,6 +179,16 @@ public void writeNullChars...
true
Other
spring-projects
spring-framework
04ce61968d03e131cac5eeb3feef34feed0882c0.json
Fix typo in cache abstraction chapter Closes gh-22256
src/docs/asciidoc/integration.adoc
@@ -6896,7 +6896,7 @@ abstraction uses a simple `KeyGenerator` based on the following algorithm: * If no params are given, return `SimpleKey.EMPTY`. * If only one param is given, return that instance. -* If more the one param is given, return a `SimpleKey` that contains all parameters. +* If more than one param is ...
false
Other
spring-projects
spring-framework
2a76a65708bef8b86d47485a747d6005866b0e32.json
Switch master to 5.2.0.BUILD-SNAPSHOT
gradle.properties
@@ -1 +1 @@ -version=5.1.5.BUILD-SNAPSHOT +version=5.2.0.BUILD-SNAPSHOT
false
Other
spring-projects
spring-framework
b219c6ce15637a7a190a657f864e631e428b5378.json
Adjust UriComponentsBuilder#toUriString behavior Commit #93b7a4 added support for pre-configuring URI variables at the UriComponentsBuilder level, and also changed toUriString to encode template and URI variables separately. However this went a bit too far causing side effects for URLs with curly braces that don't rep...
spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java
@@ -441,15 +441,25 @@ public URI build(Map<String, ?> uriVariables) { } /** - * Build a URI String. This is a shortcut for: + * Build a URI String. + * <p>Effectively, a shortcut for building, encoding, and returning the + * String representation: + * <pre class="code"> + * String uri = builder.build().enco...
false
Other
spring-projects
spring-framework
b94e8c4bef90c78231063ad2c6f5bec8fc11b899.json
Fix ClassCastException in FormHttpMessageConverter We should not cast MultiValueMap<String, ?> to MultiValueMap<String, String>
spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java
@@ -270,7 +270,7 @@ public void write(MultiValueMap<String, ?> map, @Nullable MediaType contentType, throws IOException, HttpMessageNotWritableException { if (!isMultipart(map, contentType)) { - writeForm((MultiValueMap<String, String>) map, contentType, outputMessage); + writeForm((MultiValueMap<String, O...
false
Other
spring-projects
spring-framework
56d93bac892e728701d67a4865226035cf0bb3a5.json
Fix spelling of "reactive HttpClient" in doc
src/docs/asciidoc/web/webflux-webclient.adoc
@@ -9,7 +9,7 @@ and response content. Internally `WebClient` delegates to an HTTP client library. By default, it uses https://github.com/reactor/reactor-netty[Reactor Netty], there is built-in support for -the Jetty https://github.com/jetty-project/jetty-reactive-httpclient[reactive HtpClient], +the Jetty https://g...
false
Other
spring-projects
spring-framework
a218bf40cde2998f7db041d87d85e605e1a880b4.json
Join identical catch branches See gh-2052
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java
@@ -272,15 +272,7 @@ public String[] getParameterNames(Method method) { } } } - catch (AmbiguousBindingException ambigEx) { - if (this.raiseExceptions) { - throw ambigEx; - } - else { - return null; - } - } - catch (IllegalArgumentException ex) { + catch (AmbiguousBindingException | Illega...
true
Other
spring-projects
spring-framework
a218bf40cde2998f7db041d87d85e605e1a880b4.json
Join identical catch branches See gh-2052
spring-expression/src/test/java/org/springframework/expression/spel/ExpressionLanguageScenarioTests.java
@@ -80,13 +80,9 @@ public void testScenario_UsingStandardInfrastructure() { assertEquals("hello world", value); assertEquals(String.class, value.getClass()); } - catch (EvaluationException ee) { - ee.printStackTrace(); - fail("Unexpected Exception: " + ee.getMessage()); - } - catch (ParseException pe)...
true
Other
spring-projects
spring-framework
a218bf40cde2998f7db041d87d85e605e1a880b4.json
Join identical catch branches See gh-2052
spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java
@@ -276,13 +276,9 @@ protected void setValue(String expression, Object value) { e.setValue(lContext, value); assertEquals("Retrieved value was not equal to set value", value, e.getValue(lContext,value.getClass())); } - catch (EvaluationException ee) { - ee.printStackTrace(); - fail("Unexpected Exception...
true
Other
spring-projects
spring-framework
a218bf40cde2998f7db041d87d85e605e1a880b4.json
Join identical catch branches See gh-2052
spring-tx/src/main/java/org/springframework/transaction/jta/SpringJtaSynchronizationAdapter.java
@@ -121,14 +121,10 @@ public void beforeCompletion() { boolean readOnly = TransactionSynchronizationManager.isCurrentTransactionReadOnly(); this.springSynchronization.beforeCommit(readOnly); } - catch (RuntimeException ex) { + catch (RuntimeException | Error ex) { setRollbackOnlyIfPossible(); throw...
true
Other
spring-projects
spring-framework
a218bf40cde2998f7db041d87d85e605e1a880b4.json
Join identical catch branches See gh-2052
spring-tx/src/test/java/org/springframework/transaction/jta/MockUOWManager.java
@@ -56,15 +56,10 @@ public void runUnderUOW(int type, boolean join, UOWAction action) throws UOWActi action.run(); this.status = (this.rollbackOnly ? UOW_STATUS_ROLLEDBACK : UOW_STATUS_COMMITTED); } - catch (Error err) { - this.status = UOW_STATUS_ROLLEDBACK; - throw err; - } - catch (RuntimeException...
true
Other
spring-projects
spring-framework
5a8b8b11e429042ebcbe141f2fcb0fabd1dfae4d.json
Add test for calculateCapacity Issue: SPR-17558 Closes gh-2054
spring-core/src/main/java/org/springframework/core/codec/CharSequenceEncoder.java
@@ -99,7 +99,7 @@ public Flux<DataBuffer> encode(Publisher<? extends CharSequence> inputStream, }); } - private int calculateCapacity(CharSequence sequence, Charset charset) { + int calculateCapacity(CharSequence sequence, Charset charset) { float maxBytesPerChar = this.charsetToMaxBytesPerChar .computeI...
true
Other
spring-projects
spring-framework
5a8b8b11e429042ebcbe141f2fcb0fabd1dfae4d.json
Add test for calculateCapacity Issue: SPR-17558 Closes gh-2054
spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java
@@ -16,11 +16,19 @@ package org.springframework.core.codec; +import java.nio.charset.Charset; +import java.util.stream.Stream; + +import org.junit.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.util.MimeTypeUtils; +import static java.nio....
true
Other
spring-projects
spring-framework
ad88c02bc3bc031916e65b0a777cbce561848bca.json
Restore formatting change following revert
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java
@@ -281,8 +281,7 @@ else if (mediaType.equals(MediaType.ALL) || mediaType.equals(MEDIA_TYPE_APPLICAT inputMessage, outputMessage); if (body != null) { if (logger.isDebugEnabled()) { - Object formatted = (body instanceof CharSequence ? "\"" + body + "\"" : body); - logger.debug("Writing ...
true
Other
spring-projects
spring-framework
ad88c02bc3bc031916e65b0a777cbce561848bca.json
Restore formatting change following revert
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
@@ -885,8 +885,8 @@ protected ModelAndView invokeHandlerMethod(HttpServletRequest request, mavContainer = (ModelAndViewContainer) asyncManager.getConcurrentResultContext()[0]; asyncManager.clearConcurrentResult(); if (logger.isDebugEnabled()) { - logger.debug("Resume with async result [" + - (r...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java
@@ -61,7 +61,7 @@ * <p>On the classpath, bundle resources will be read with the locally configured * {@link #setDefaultEncoding encoding}: by default, ISO-8859-1; consider switching * this to UTF-8, or to {@code null} for the platform default encoding. On the JDK 9+ - * module path where locally provided {@link R...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java
@@ -32,8 +32,8 @@ /** * The default implementation of Spring's {@link SqlRowSet} interface, wrapping a - * {@link java.sql.ResultSet}, catching any {@link SQLException java.sql.ResultSet}, catching any {@link SQLExceptions} and translating - * them to a corresponding Spring {@link InvalidResultSetAccessException}....
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java
@@ -23,8 +23,8 @@ import org.springframework.lang.Nullable; /** - * The default implementation of Spring's {@link SqlRowSetMetaData} interface, wrapping - * a {@link java.sql.ResultSetMetaData} instance, catching any {@link SQLException java.sql.ResultSetMetaData} instance, catching any {@link SQLExceptions} + * Th...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyCodec.java
@@ -34,7 +34,8 @@ public interface ReactorNettyCodec<P> { /** - * Decode the input {@link ByteBuf} into one or more {@link Message ByteBuf} into one or more {@link Messages}. + * Decode the input {@link ByteBuf} into one or more {@link Message ByteBuf} + * into one or more {@link Message} objects. * @param i...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-web/src/main/java/org/springframework/http/client/InterceptingClientHttpRequestFactory.java
@@ -24,7 +24,8 @@ import org.springframework.lang.Nullable; /** - * {@link ClientHttpRequestFactory} wrapper with support for {@link ClientHttpRequestInterceptor ClientHttpRequestFactory} wrapper with support for {@link ClientHttpRequestInterceptors}. + * {@link ClientHttpRequestFactory} wrapper with support for + ...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-web/src/main/java/org/springframework/http/client/OkHttp3ClientHttpRequestFactory.java
@@ -71,9 +71,8 @@ public OkHttp3ClientHttpRequestFactory(OkHttpClient client) { /** - * Sets the underlying read timeout in milliseconds. + * Set the underlying read timeout in milliseconds. * A value of 0 specifies an infinite timeout. - * @see OkHttpClient.Builder#readTimeout(long, TimeUnit) */ publi...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-web/src/main/java/org/springframework/http/converter/protobuf/ProtobufJsonFormatHttpMessageConverter.java
@@ -43,15 +43,15 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC /** * Construct a new {@code ProtobufJsonFormatHttpMessageConverter} with default - * {@link JsonFormat.Parser} and {@link JsonFormat.Printer} configuration. + * {@code JsonFormat.Parser} and {@code JsonFormat....
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-web/src/main/java/org/springframework/http/server/reactive/HttpHandler.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -24,16 +24,16 @@ * * <p>Higher-level, bu...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java
@@ -55,8 +55,8 @@ public boolean hasError(ClientHttpResponse response) throws IOException { /** * Template method called from {@link #hasError(ClientHttpResponse)}. * <p>The default implementation checks if the given status code is - * {@link HttpStatus.Series#CLIENT_ERROR CLIENT_ERROR} or - * {@link HttpStat...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-web/src/main/java/org/springframework/web/client/ExtractingResponseErrorHandler.java
@@ -45,10 +45,10 @@ * {@linkplain #setSeriesMapping(Map) series mapping}. * * <p>If there is no match, this error handler will default to the behavior of - * {@link DefaultResponseErrorHandler}. Note that you can override this default behavior by - * specifying a {@linkplain #setSeriesMapping(Map) series mapping}...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-web/src/main/java/org/springframework/web/client/RestTemplate.java
@@ -73,7 +73,7 @@ * support of less frequent cases. * * <p><strong>NOTE:</strong> As of 5.0, the non-blocking, reactive - * {@link org.springframework.web.reactive.client.WebClient WebClient} offers a + * {@code org.springframework.web.reactive.client.WebClient} offers a * modern alternative to the {@code RestT...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-web/src/main/java/org/springframework/web/server/session/CookieWebSessionIdResolver.java
@@ -81,10 +81,8 @@ public Duration getCookieMaxAge() { } /** - * Add {@link Consumer} for a {@link ResponseCookie.ResponseCookieBuilder - * ResponseCookieBuilder} that will be invoked for each cookie being built, - * just before the call to - * {@link ResponseCookie.ResponseCookieBuilder#build() build()}. + ...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java
@@ -320,20 +320,20 @@ static Builder from(ServerRequest other) { interface Headers { /** - * Return the list of acceptable {@linkplain MediaType media types}, + * Return the list of acceptable {@code MediaType media types}, * as specified by the {@code Accept} header. * <p>Returns an empty list when ...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/UndertowWebSocketClient.java
@@ -116,9 +116,10 @@ public XnioWorker getXnioWorker() { /** * Set the {@link io.undertow.connector.ByteBufferPool ByteBufferPool} to pass to * {@link io.undertow.websockets.client.WebSocketClient#connectionBuilder}. - * <p>By default an indirect {@link io.undertow.server.DefaultByteBufferPool} with a buffer s...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolHandler.java
@@ -27,8 +27,9 @@ /** * A contract for handling WebSocket messages as part of a higher level protocol, - * referred to as "sub-protocol" in the WebSocket RFC specification. Handles both - * {@link WebSocketMessage}s from a client as well as {@link Message WebSocketMessage}s from a client as well as {@link Messages...
true
Other
spring-projects
spring-framework
84300b796cbd974b81ff3406502e3a7cd6cf1397.json
Fix recent javadoc errors Issue: SPR-17174
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java
@@ -53,8 +53,8 @@ * A basic implementation of {@link org.springframework.web.socket.sockjs.SockJsService} * with support for SPI-based transport handling and session management. * - * <p>Based on the {@link TransportHandler} SPI. {@link TransportHandler TransportHandler} SPI. {@link TransportHandlers} may additio...
true
Other
spring-projects
spring-framework
432cdd7802b9d1109eb02925d45782b6c99b9e01.json
Add ResponseEntity.of(Optional) variant When dealing with `Optional` values in a Controller handler (for example, values coming from a Spring Data repository), developers might reuse this code snippet quite often: ``` @GetMapping("/user") public ResponseEntity<Optional<User>> fetchUser() { Optional<User> user = //....
spring-web/src/main/java/org/springframework/http/ResponseEntity.java
@@ -19,6 +19,7 @@ import java.net.URI; import java.util.Arrays; import java.util.LinkedHashSet; +import java.util.Optional; import java.util.Set; import org.springframework.lang.Nullable; @@ -213,6 +214,18 @@ public static BodyBuilder status(int status) { return new DefaultBuilder(status); } + /** + * A ...
true
Other
spring-projects
spring-framework
432cdd7802b9d1109eb02925d45782b6c99b9e01.json
Add ResponseEntity.of(Optional) variant When dealing with `Optional` values in a Controller handler (for example, values coming from a Spring Data repository), developers might reuse this code snippet quite often: ``` @GetMapping("/user") public ResponseEntity<Optional<User>> fetchUser() { Optional<User> user = //....
spring-web/src/test/java/org/springframework/http/ResponseEntityTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -19,6 +19,7 @@ import java.net.URI; import...
true
Other
spring-projects
spring-framework
69e4f21f9023c319f36e49b239b5388485b22480.json
Use JUnit 5 Maven BOM in Gradle build Issue: SPR-17129
build.gradle
@@ -34,9 +34,7 @@ ext { hsqldbVersion = "2.4.1" jackson2Version = "2.9.6" jettyVersion = "9.4.12.RC1" - junitPlatformVersion = "1.3.0-RC1" - junitJupiterVersion = "5.3.0-RC1" - junitVintageVersion = "5.3.0-RC1" + junit5Version = '5.3.0-RC1' kotlinVersion = "1.2.60" log4jVer...
true
Other
spring-projects
spring-framework
69e4f21f9023c319f36e49b239b5388485b22480.json
Use JUnit 5 Maven BOM in Gradle build Issue: SPR-17129
spring-test/spring-test.gradle
@@ -2,6 +2,7 @@ description = "Spring TestContext Framework" dependencyManagement { imports { + mavenBom "org.junit:junit-bom:${junit5Version}" mavenBom "io.projectreactor:reactor-bom:${reactorVersion}" mavenBom "io.netty:netty-bom:${nettyVersion}" } @@ -27,8 +28,8 @@ dependencies { optional("javax.serv...
true
Other
spring-projects
spring-framework
4d7b265258f82d25e1398b0188922d153b1064f7.json
Fix merge conflict in reference manual
src/docs/asciidoc/web/webflux.adoc
@@ -1749,14 +1749,10 @@ controller. The following code snippet shows the usage: [TIP] ==== -<<<<<<< HEAD Unlike the Servlet API "request parameter" concept that conflates query parameters, form -======= -Unlike the Servlet API "request paramater" concept that conflate query parameters, form ->>>>>>> parent of 7e91...
false
Other
spring-projects
spring-framework
2f732a8dea7c056a24afbafd59747118d56f5106.json
Fix checkstyle errors
spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java
@@ -28,7 +28,6 @@ import reactor.netty.http.client.HttpClientResponse; import reactor.netty.resources.ConnectionProvider; import reactor.netty.resources.LoopResources; -import reactor.netty.tcp.TcpClient; import org.springframework.http.HttpMethod; import org.springframework.util.Assert; @@ -49,7 +48,7 @@ public...
false
Other
spring-projects
spring-framework
777bd0d022cb61d5570ccb6617a4b77616674a1b.json
Fix Checkstyle violation in JCacheCache
spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java
@@ -17,7 +17,6 @@ package org.springframework.cache.jcache; import java.util.concurrent.Callable; - import javax.cache.Cache; import javax.cache.processor.EntryProcessor; import javax.cache.processor.EntryProcessorException;
false
Other
spring-projects
spring-framework
8126ffbc8c003ad50ca4e559f28102ee93f65044.json
Fix broken links in JavaDoc Issue: SPR-17174
spring-core/src/main/java/org/springframework/util/function/SingletonSupplier.java
@@ -22,7 +22,7 @@ import org.springframework.util.Assert; /** - * A {@link java.util.function Supplier} decorator that caches a singleton result and + * A {@link java.util.function.Supplier} decorator that caches a singleton result and * makes it available from {@link #get()} (nullable) and {@link #obtain()} (nul...
true
Other
spring-projects
spring-framework
8126ffbc8c003ad50ca4e559f28102ee93f65044.json
Fix broken links in JavaDoc Issue: SPR-17174
spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java
@@ -363,8 +363,10 @@ interface RouterFunctionSpec extends MockServerSpec<RouterFunctionSpec> { /** - * Steps for customizing the {@link WebClient} used to test with - * internally delegating to a {@link WebClient.Builder}. + * Steps for customizing the {@link WebClient} used to test with, + * internally deleg...
true
Other
spring-projects
spring-framework
8126ffbc8c003ad50ca4e559f28102ee93f65044.json
Fix broken links in JavaDoc Issue: SPR-17174
spring-web/src/main/java/org/springframework/web/client/ExtractingResponseErrorHandler.java
@@ -29,15 +29,16 @@ import org.springframework.util.CollectionUtils; /** - * Implementation of {@link ResponseErrorHandler} that uses {@link HttpMessageConverter ResponseErrorHandler} that uses {@link HttpMessageConverters} to - * convert HTTP error responses to {@link RestClientException}. + * Implementation of {@...
true
Other
spring-projects
spring-framework
8126ffbc8c003ad50ca4e559f28102ee93f65044.json
Fix broken links in JavaDoc Issue: SPR-17174
spring-web/src/main/java/org/springframework/web/server/handler/FilteringWebHandler.java
@@ -26,8 +26,8 @@ import org.springframework.web.server.WebHandler; /** - * {@link WebHandler} decorator that invokes a chain of {@link WebFilter WebHandler} decorator that invokes a chain of {@link WebFilters} - * before the delegate {@link WebHandler}. + * {@link WebHandlerDecorator} that invokes a chain of {@lin...
true
Other
spring-projects
spring-framework
8126ffbc8c003ad50ca4e559f28102ee93f65044.json
Fix broken links in JavaDoc Issue: SPR-17174
spring-web/src/main/java/org/springframework/web/server/handler/WebHandlerDecorator.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -23,7 +23,7 @@ import org.springframework.w...
true
Other
spring-projects
spring-framework
8126ffbc8c003ad50ca4e559f28102ee93f65044.json
Fix broken links in JavaDoc Issue: SPR-17174
spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java
@@ -45,7 +45,7 @@ public interface WebFluxConfigurer { /** * Configure how the content type requested for the response is resolved - * when handling reqests with annotated controllers. + * when handling requests with annotated controllers. * @param builder for configuring the resolvers to use */ defau...
true
Other
spring-projects
spring-framework
8126ffbc8c003ad50ca4e559f28102ee93f65044.json
Fix broken links in JavaDoc Issue: SPR-17174
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java
@@ -27,7 +27,8 @@ import org.springframework.web.servlet.ModelAndView; /** - * A {@link HandlerExceptionResolver} that delegates to a list of other {@link HandlerExceptionResolver HandlerExceptionResolver} that delegates to a list of other {@link HandlerExceptionResolvers}. + * A {@link HandlerExceptionResolver} th...
true
Other
spring-projects
spring-framework
1dcb6236a639ff74f9060487ed968a289c13f97f.json
Fix broken links in JavaDoc First step (as proof of concept) toward addressing SPR-17174. Issue: SPR-17174
spring-web/src/main/java/org/springframework/http/codec/xml/XmlEventDecoder.java
@@ -47,17 +47,19 @@ import org.springframework.util.xml.StaxUtils; /** - * Decodes a {@link DataBuffer} stream into a stream of {@link XMLEvent DataBuffer} stream into a stream of {@link XMLEvents}. - * That is, given the following XML: + * Decodes a {@link DataBuffer} stream into a stream of {@link XMLEvent XMLEve...
true
Other
spring-projects
spring-framework
1dcb6236a639ff74f9060487ed968a289c13f97f.json
Fix broken links in JavaDoc First step (as proof of concept) toward addressing SPR-17174. Issue: SPR-17174
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurer.java
@@ -82,7 +82,7 @@ default void configureDefaultServletHandling(DefaultServletHandlerConfigurer con } /** - * Add {@link Converter}s and {@link Formatter Converter}s and {@link Formatters} in addition to the ones + * Add {@link Converter Converters} and {@link Formatter Formatters} in addition to the ones * r...
true
Other
spring-projects
spring-framework
5322fa0fb71a55fdda1bf22396863d329026ce39.json
Use an import instead of FQCN javax.xml.stream.Location is already there as an import there is no need to use the FQCN in the handleDtd method.
spring-core/src/main/java/org/springframework/util/xml/StaxStreamXMLReader.java
@@ -243,7 +243,7 @@ private void handleComment() throws SAXException { private void handleDtd() throws SAXException { if (getLexicalHandler() != null) { - javax.xml.stream.Location location = this.reader.getLocation(); + Location location = this.reader.getLocation(); getLexicalHandler().startDTD(null, lo...
false
Other
spring-projects
spring-framework
20d0221d4f315842ced55ffcf9d26f0bdb139e90.json
Use an import instead of FQCN No that JCacheCache extends AbstractValueAdaptingCache instead of directly implementing Cache an import statement can be used in favor of using the FQCN for the field and constructor arguments.
spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java
@@ -17,6 +17,8 @@ package org.springframework.cache.jcache; import java.util.concurrent.Callable; + +import javax.cache.Cache; import javax.cache.processor.EntryProcessor; import javax.cache.processor.EntryProcessorException; import javax.cache.processor.MutableEntry; @@ -37,14 +39,14 @@ */ public class JCach...
true
Other
spring-projects
spring-framework
20d0221d4f315842ced55ffcf9d26f0bdb139e90.json
Use an import instead of FQCN No that JCacheCache extends AbstractValueAdaptingCache instead of directly implementing Cache an import statement can be used in favor of using the FQCN for the field and constructor arguments.
spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCacheManager.java
@@ -39,7 +39,7 @@ public class JCacheCacheManager extends AbstractTransactionSupportingCacheManager { @Nullable - private javax.cache.CacheManager cacheManager; + private CacheManager cacheManager; private boolean allowNullValues = true; @@ -63,15 +63,15 @@ public JCacheCacheManager(CacheManager cacheManager...
true
Other
spring-projects
spring-framework
aef39e8954a3bde51d20eab598741898d5f7eeaa.json
Remove test class added by mistake
spring-webflux/src/test/java/org/springframework/web/reactive/function/client/MyTest.java
@@ -1,82 +0,0 @@ -/* - * 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 - ...
false
Other
spring-projects
spring-framework
282a4ad2f6c5fa5ebd3ca0c4a9fda8be3611e02e.json
Fix checkstyle violations
spring-core/src/main/java/org/springframework/util/unit/DataSize.java
@@ -31,7 +31,7 @@ * @author Stephane Nicoll * @since 5.1 */ -public class DataSize implements Comparable<DataSize> { +public final class DataSize implements Comparable<DataSize> { /** * The pattern for parsing.
true
Other
spring-projects
spring-framework
282a4ad2f6c5fa5ebd3ca0c4a9fda8be3611e02e.json
Fix checkstyle violations
spring-core/src/main/java/org/springframework/util/unit/package-info.java
@@ -1,19 +1,3 @@ -/* - * 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