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 | 58e9266e99c2931b97849feb28a1419636fe6457.json | Add Consumer methods to RSocketRequester
Closes gh-23513 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequester.java | @@ -18,6 +18,7 @@
import java.util.Collections;
import java.util.Map;
+import java.util.function.Consumer;
import io.rsocket.Payload;
import io.rsocket.RSocket;
@@ -133,6 +134,12 @@ public RequestSpec metadata(Object metadata, MimeType mimeType) {
return this;
}
+ @Override
+ public RequestSpec metad... | true |
Other | spring-projects | spring-framework | 58e9266e99c2931b97849feb28a1419636fe6457.json | Add Consumer methods to RSocketRequester
Closes gh-23513 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilder.java | @@ -135,6 +135,12 @@ public RSocketRequester.Builder rsocketFactory(ClientRSocketFactoryConfigurer co
return this;
}
+ @Override
+ public RSocketRequester.Builder apply(Consumer<RSocketRequester.Builder> configurer) {
+ configurer.accept(this);
+ return this;
+ }
+
@Override
public Mono<RSocketRequester> c... | true |
Other | spring-projects | spring-framework | 58e9266e99c2931b97849feb28a1419636fe6457.json | Add Consumer methods to RSocketRequester
Closes gh-23513 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketRequester.java | @@ -197,6 +197,14 @@ interface Builder {
*/
RSocketRequester.Builder rsocketFactory(ClientRSocketFactoryConfigurer configurer);
+ /**
+ * Configure this builder through a {@code Consumer}. This enables
+ * libraries such as Spring Security to provide shortcuts for applying
+ * a set of related customiza... | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java | @@ -1909,7 +1909,7 @@ public void setCompany(String co) {
@SuppressWarnings("unused")
private static class DifferentTestBean extends TestBean {
- // class to test naming of beans in a error message
+ // class to test naming of beans in an error message
}
@SuppressWarnings("unused") | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-web/src/main/java/org/springframework/http/StreamingHttpOutputMessage.java | @@ -20,7 +20,7 @@
import java.io.OutputStream;
/**
- * Represents a HTTP output message that allows for setting a streaming body.
+ * Represents an HTTP output message that allows for setting a streaming body.
* Note that such messages typically do not support {@link #getBody()} access.
*
* @author Arjen Pout... | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java | @@ -202,7 +202,7 @@ protected RemoteInvocationResult doExecuteRequest(
}
/**
- * Create a HttpPost for the given configuration.
+ * Create an HttpPost for the given configuration.
* <p>The default implementation creates a standard HttpPost with
* "application/x-java-serialized-object" as "Content-Type" he... | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java | @@ -352,7 +352,7 @@ public interface Visitor {
void pathExtension(String extension);
/**
- * Receive notification of a HTTP header predicate.
+ * Receive notification of an HTTP header predicate.
* @param name the name of the HTTP header to check
* @param value the desired value of the HTTP header
... | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java | @@ -81,7 +81,7 @@ public interface HandlerInterceptor {
* <p>DispatcherServlet processes a handler in an execution chain, consisting
* of any number of interceptors, with the handler itself at the end.
* With this method, each interceptor can decide to abort the execution chain,
- * typically sending a HTTP e... | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java | @@ -347,7 +347,7 @@ public interface Visitor {
void pathExtension(String extension);
/**
- * Receive notification of a HTTP header predicate.
+ * Receive notification of an HTTP header predicate.
* @param name the name of the HTTP header to check
* @param value the desired value of the HTTP header
... | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java | @@ -401,7 +401,7 @@ protected ModelAndView handleTypeMismatch(TypeMismatchException ex,
/**
* Handle the case where a {@linkplain org.springframework.http.converter.HttpMessageConverter message converter}
- * cannot read from a HTTP request.
+ * cannot read from an HTTP request.
* <p>The default implementat... | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java | @@ -70,7 +70,7 @@ protected ServletUriComponentsBuilder(ServletUriComponentsBuilder other) {
}
- // Factory methods based on a HttpServletRequest
+ // Factory methods based on an HttpServletRequest
/**
* Prepare a builder from the host, port, scheme, and context path of the | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java | @@ -55,7 +55,7 @@
* but this behavior can be changed by overriding the
* {@link #isEligibleProperty(String, Object)} method.
*
- * <p>A URL for this view is supposed to be a HTTP redirect URL, i.e.
+ * <p>A URL for this view is supposed to be an HTTP redirect URL, i.e.
* suitable for HttpServletResponse's {@cod... | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java | @@ -147,7 +147,7 @@ protected ClassLoader getBundleClassLoader() {
* <p>This avoids repeated "yyy1.(parent)=xxx", "yyy2.(parent)=xxx" definitions
* in the bundle, especially if all defined views share the same parent.
* <p>The parent will typically define the view class and common attributes.
- * Concrete vie... | true |
Other | spring-projects | spring-framework | a6f4862f13f96026bad09d4f40de933035043433.json | Fix typos related to indefinite articles
Closes gh-23555 | src/docs/asciidoc/languages/kotlin.adoc | @@ -130,7 +130,7 @@ since the later requires a reference to the outer class.
== Annotations
The Spring Framework also takes advantage of https://kotlinlang.org/docs/reference/null-safety.html[Kotlin null-safety]
-to determine if a HTTP parameter is required without having to explicitly
+to determine if an HTTP para... | true |
Other | spring-projects | spring-framework | 0103fec5de0fa621c55a39d1025f40592ac7515e.json | Convert assertions to AssertJ
See gh-23551 | spring-web/src/test/java/org/springframework/http/HttpHeadersTests.java | @@ -608,10 +608,10 @@ public void readOnlyHttpHeadersRetainEntrySetOrder() {
String[] expectedKeys = new String[] { "aardvark", "beaver", "cat", "dog", "elephant" };
- assertArrayEquals(expectedKeys, headers.entrySet().stream().map(Entry::getKey).toArray());
+ assertThat(headers.entrySet()).extracting(Entry::g... | false |
Other | spring-projects | spring-framework | 57f0c2b7dfd343e974a5b973252712b8f5c463c5.json | Remove bodyWithType extension from WebTestClient
Since there is no more clash with the new bodyValue
method name.
See gh-23523 | spring-test/src/main/kotlin/org/springframework/test/web/reactive/server/WebTestClientExtensions.kt | @@ -30,13 +30,12 @@ import org.springframework.test.web.reactive.server.WebTestClient.*
* @author Sebastien Deleuze
* @since 5.0
*/
-@Deprecated("Use 'bodyWithType' instead.", replaceWith = ReplaceWith("bodyWithType(publisher)"))
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
inline fun <reified T : Any, S : Publish... | true |
Other | spring-projects | spring-framework | 57f0c2b7dfd343e974a5b973252712b8f5c463c5.json | Remove bodyWithType extension from WebTestClient
Since there is no more clash with the new bodyValue
method name.
See gh-23523 | spring-test/src/test/kotlin/org/springframework/test/web/reactive/server/WebTestClientExtensionsTests.kt | @@ -40,24 +40,24 @@ class WebTestClientExtensionsTests {
@Test
- fun `RequestBodySpec#bodyWithType with Publisher and reified type parameters`() {
+ fun `RequestBodySpec#body with Publisher and reified type parameters`() {
val body = mockk<Publisher<Foo>>()
- requestBodySpec.bodyWithType(body)
+ requestBodyS... | true |
Other | spring-projects | spring-framework | ff1f8aa5a820bae55735ebf6afa84d602828d3b5.json | Add missing parentheses in Testing chapter | src/docs/asciidoc/testing.adoc | @@ -1017,7 +1017,7 @@ The following example shows how to use `@SqlMergeMode` at the class level.
@Test
@Sql("/user-test-data-001.sql")
- void standardUserProfile {
+ void standardUserProfile() {
// execute code that relies on test data set 001
}
}
@@ -1036,7 +1036,7 @@ The following example shows how... | false |
Other | spring-projects | spring-framework | 489193dfa6fbf6f660f5f250a37e85e3d3401ceb.json | Add missing parentheses in Testing chapter | src/docs/asciidoc/testing.adoc | @@ -964,7 +964,7 @@ it:
----
@Test
@Sql({"/test-schema.sql", "/test-user-data.sql"}) <1>
- void userTest {
+ void userTest() {
// execute code that relies on the test schema and test data
}
----
@@ -987,7 +987,7 @@ configured with the `@Sql` annotation. The following example shows how to use it
scripts = ... | false |
Other | spring-projects | spring-framework | 8e81360eba8cca33522872cdf48eb5f0b84644cb.json | Use pre-parsed PathContainer in WebMvc.fn
This commit makes the default ServerRequest implementation use a pre-
parsed path container, instead of parsing the path for each invocation
of pathContainer(). | spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java | @@ -52,6 +52,7 @@
import org.springframework.http.MediaType;
import org.springframework.http.converter.GenericHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.server.PathContainer;
import org.springframework.http.server.ServletServerHttpRequest;
... | false |
Other | spring-projects | spring-framework | fdfe58362e3fc71174a13a4e6e447e3eca443409.json | Upgrade Gradle plugins | build.gradle | @@ -1,12 +1,12 @@
plugins {
- id 'io.spring.dependency-management' version '1.0.8.RELEASE' apply false
+ id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
id 'org.jetbrains.kotlin.jvm' version '1.3.72' apply false
id 'org.jetbrains.dokka' version '0.10.1' apply false
id 'org.asciidoctor.jv... | true |
Other | spring-projects | spring-framework | fdfe58362e3fc71174a13a4e6e447e3eca443409.json | Upgrade Gradle plugins | gradle/docs.gradle | @@ -3,7 +3,7 @@ configurations {
}
dependencies {
- asciidoctorExt("io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch:0.4.0.RELEASE")
+ asciidoctorExt("io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch:0.4.2.RELEASE")
}
repositories { | true |
Other | spring-projects | spring-framework | 7bd524e9d705f0189730b3a3b4c41ebde0a2936b.json | Add ClientHttpConnector test suite
This commit introduces a test suite for ClientHttpConnector
implementations, as well as fixes that resolve issues identified by
these tests.
Closes gh-24941 | spring-web/src/main/java/org/springframework/http/client/reactive/HttpComponentsClientHttpConnector.java | @@ -27,6 +27,7 @@
import org.apache.hc.client5.http.protocol.HttpClientContext;
import org.apache.hc.core5.concurrent.FutureCallback;
import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStreamResetException;
import org.apache.hc.core5.http.Message;
import org.apache.hc.core5.http.nio... | true |
Other | spring-projects | spring-framework | 7bd524e9d705f0189730b3a3b4c41ebde0a2936b.json | Add ClientHttpConnector test suite
This commit introduces a test suite for ClientHttpConnector
implementations, as well as fixes that resolve issues identified by
these tests.
Closes gh-24941 | spring-web/src/main/java/org/springframework/http/client/reactive/HttpComponentsClientHttpRequest.java | @@ -20,6 +20,7 @@
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.util.Collection;
+import java.util.function.Function;
import org.apache.hc.client5.http.cookie.CookieStore;
import org.apache.hc.client5.http.impl.cookie.BasicClientCookie;
@@ -39,13 +40,14 @@
import org.springframewor... | true |
Other | spring-projects | spring-framework | 7bd524e9d705f0189730b3a3b4c41ebde0a2936b.json | Add ClientHttpConnector test suite
This commit introduces a test suite for ClientHttpConnector
implementations, as well as fixes that resolve issues identified by
these tests.
Closes gh-24941 | spring-web/src/main/java/org/springframework/http/client/reactive/HttpComponentsClientHttpResponse.java | @@ -39,6 +39,7 @@
* {@link ClientHttpResponse} implementation for the Apache HttpComponents HttpClient 5.x.
*
* @author Martin Tarjányi
+ * @author Arjen Poutsma
* @since 5.3
* @see <a href="https://hc.apache.org/index.html">Apache HttpComponents</a>
*/ | true |
Other | spring-projects | spring-framework | 7bd524e9d705f0189730b3a3b4c41ebde0a2936b.json | Add ClientHttpConnector test suite
This commit introduces a test suite for ClientHttpConnector
implementations, as well as fixes that resolve issues identified by
these tests.
Closes gh-24941 | spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpConnector.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -91,12 +91,13 @@ public JettyClientHttpConne... | true |
Other | spring-projects | spring-framework | 7bd524e9d705f0189730b3a3b4c41ebde0a2936b.json | Add ClientHttpConnector test suite
This commit introduces a test suite for ClientHttpConnector
implementations, as well as fixes that resolve issues identified by
these tests.
Closes gh-24941 | spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpRequest.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,14 +26,13 @@
import org.eclipse.jetty.r... | true |
Other | spring-projects | spring-framework | 7bd524e9d705f0189730b3a3b4c41ebde0a2936b.json | Add ClientHttpConnector test suite
This commit introduces a test suite for ClientHttpConnector
implementations, as well as fixes that resolve issues identified by
these tests.
Closes gh-24941 | spring-web/src/test/java/org/springframework/http/client/reactive/ClientHttpConnectorTests.java | @@ -0,0 +1,237 @@
+/*
+ * Copyright 2002-2020 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
... | true |
Other | spring-projects | spring-framework | a378480faf28876fc62fc60fbe813abe11710bef.json | Fix Artifactory properties on published artifacts
This commit fixes the file pattern for the published zip artifacts.
Prior to this commit, the pattern was wrong and properties were not
applied to the published archives, preventing them from being published
automatically (javadoc, reference documentation, schemas...).... | ci/pipeline.yml | @@ -187,21 +187,21 @@ jobs:
threads: 8
artifact_set:
- include:
- - "/**/spring-framework-*.zip"
+ - "/**/spring-*.zip"
properties:
"zip.name": "spring-framework"
"zip.displayname": "Spring Framework"
"zip.deployed": "false"
- include:
... | false |
Other | spring-projects | spring-framework | fbc1b96aa61c9ed6b8b0b6739719ca6cd4e56652.json | Add git repo as output for build tasks
This is required for exporting the Gradle Build Scan URL to
notifications.
See gh-22490 | ci/tasks/build-project.yml | @@ -4,6 +4,7 @@ inputs:
- name: git-repo
outputs:
- name: distribution-repository
+- name: git-repo
caches:
- path: gradle
params: | true |
Other | spring-projects | spring-framework | fbc1b96aa61c9ed6b8b0b6739719ca6cd4e56652.json | Add git repo as output for build tasks
This is required for exporting the Gradle Build Scan URL to
notifications.
See gh-22490 | ci/tasks/check-project.yml | @@ -4,6 +4,7 @@ inputs:
- name: git-repo
outputs:
- name: distribution-repository
+- name: git-repo
caches:
- path: gradle
params: | true |
Other | spring-projects | spring-framework | 7b1de6e1a8f6207ac5d29197a962c02de9ef9d90.json | Fix Gradle build | build.gradle | @@ -3,7 +3,6 @@ plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.72' apply false
id 'org.jetbrains.dokka' version '0.10.1' apply false
id 'org.asciidoctor.jvm.convert' version '2.4.0'
- id 'io.spring.gradle-enterprise-conventions' version '0.0.2'
id 'io.spring.nohttp' version '0.0.4.RELEASE'
id 'de.underc... | false |
Other | spring-projects | spring-framework | 784a6d46c01cabb3145e3c6973f4ce18a52c0615.json | Remove BOM workaround
Since Gradle 6.2, the scope information is not published anymore with
the BOM, so we don't need to manually remove it anymore | framework-bom/framework-bom.gradle | @@ -18,12 +18,6 @@ publishing {
mavenJava(MavenPublication) {
artifactId = 'spring-framework-bom'
from components.javaPlatform
- // remove scope information from published BOM
- pom.withXml {
- asNode().dependencyManagement.first().dependencies.first().each {
- it.remove(it.scope.first())
- }
-... | false |
Other | spring-projects | spring-framework | be560d7ad5883dc906c18b17a565857904429ff1.json | Remove artifactory plugin from build
As we're moving the build to Concourse CI, we don't need to use the
Artifactory plugin anymore. Our build will publish the artifacts to a
repository on the local filesystem and will push its content to
Artifactory with the spring-io/artifactory-resource.
This commit also adds the ... | build.gradle | @@ -7,7 +7,6 @@ plugins {
id 'io.spring.nohttp' version '0.0.4.RELEASE'
id 'de.undercouch.download' version '4.0.0'
id 'com.gradle.build-scan' version '3.2'
- id "com.jfrog.artifactory" version '4.12.0' apply false
id "io.freefair.aspectj" version '4.1.1' apply false
id "com.github.ben-manes.versions" version... | true |
Other | spring-projects | spring-framework | be560d7ad5883dc906c18b17a565857904429ff1.json | Remove artifactory plugin from build
As we're moving the build to Concourse CI, we don't need to use the
Artifactory plugin anymore. Our build will publish the artifacts to a
repository on the local filesystem and will push its content to
Artifactory with the spring-io/artifactory-resource.
This commit also adds the ... | gradle/publications.gradle | @@ -1,5 +1,4 @@
apply plugin: "maven-publish"
-apply plugin: 'com.jfrog.artifactory'
publishing {
publications {
@@ -50,6 +49,16 @@ publishing {
}
}
-artifactoryPublish {
- publications(publishing.publications.mavenJava)
+configureDeploymentRepository(project)
+
+void configureDeploymentRepository(Project pr... | true |
Other | spring-projects | spring-framework | 0e9da179106f42f4b8f59c33e996e6c3fb28fc9a.json | Fix typo in webmvc-functional.adoc
Closes gh-24968 | src/docs/asciidoc/web/webmvc-functional.adoc | @@ -16,7 +16,7 @@ the same <<web#mvc-servlet>>.
In WebMvc.fn, an HTTP request is handled with a `HandlerFunction`: a function that takes
`ServerRequest` and returns a `ServerResponse`.
-Both the request as the response object have immutable contracts that offer JDK 8-friendly
+Both the request and the response obje... | false |
Other | spring-projects | spring-framework | 2002a1689a544bd49001062afcde7564ce010cea.json | Adapt test to changes in RSocket Java
See gh-24934 | spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilderTests.java | @@ -279,6 +279,11 @@ public Flux<ByteBuf> receive() {
return Flux.empty();
}
+ @Override
+ public ByteBufAllocator alloc() {
+ return ByteBufAllocator.DEFAULT;
+ }
+
@Override
public Mono<Void> onClose() {
return Mono.empty(); | false |
Other | spring-projects | spring-framework | 7c84695333228fb2960d69aa312e41e4ead3b5aa.json | Support variable resolution of wildcard types
Update `ResolvableType` so that variable referenced can be resolved
against wildcard types. Prior to this commit, given a type:
Map<String, ? extends List<? extends CharSequence>>
Calling `type.getGeneric(1).asCollection().resolveGeneric()` would
return `null`. This was... | spring-core/src/main/java/org/springframework/core/ResolvableType.java | @@ -873,6 +873,12 @@ private ResolvableType resolveVariable(TypeVariable<?> variable) {
return forType(ownerType, this.variableResolver).resolveVariable(variable);
}
}
+ if (this.type instanceof WildcardType) {
+ ResolvableType resolved = resolveType().resolveVariable(variable);
+ if (resolved != null)... | true |
Other | spring-projects | spring-framework | 7c84695333228fb2960d69aa312e41e4ead3b5aa.json | Support variable resolution of wildcard types
Update `ResolvableType` so that variable referenced can be resolved
against wildcard types. Prior to this commit, given a type:
Map<String, ? extends List<? extends CharSequence>>
Calling `type.getGeneric(1).asCollection().resolveGeneric()` would
return `null`. This was... | spring-core/src/test/java/org/springframework/core/ResolvableTypeTests.java | @@ -688,6 +688,13 @@ void resolveBoundedTypeVariableResult() throws Exception {
assertThat(type.resolve()).isEqualTo(CharSequence.class);
}
+
+ @Test
+ void resolveBoundedTypeVariableWildcardResult() throws Exception {
+ ResolvableType type = ResolvableType.forMethodReturnType(Methods.class.getMethod("boundedTy... | true |
Other | spring-projects | spring-framework | c2141e2e9323f09ef42f2af92458c2d7bb9b424b.json | Add @since tags to firstElement methods | spring-core/src/main/java/org/springframework/util/CollectionUtils.java | @@ -314,84 +314,86 @@ else if (candidate != val.getClass()) {
}
/**
- * Retrieve the last element of the given Set, using {@link SortedSet#last()}
- * or otherwise iterating over all elements (assuming a linked set).
+ * Retrieve the first element of the given Set, using {@link SortedSet#first()}
+ * or other... | false |
Other | spring-projects | spring-framework | d503bc2804b7bdbb9e9c46081a7fa454ac81c8d7.json | Add firstElement to CollectionUtils | spring-core/src/main/java/org/springframework/util/CollectionUtils.java | @@ -355,6 +355,45 @@ public static <T> T lastElement(@Nullable List<T> list) {
return list.get(list.size() - 1);
}
+ /**
+ * Retrieve the first element of the given Set, using {@link SortedSet#first()}
+ * or otherwise using the iterator.
+ * @param set the Set to check (may be {@code null} or empty)
+ * @re... | false |
Other | spring-projects | spring-framework | 14ce84cebbc8d64a5047e4287166d03ce101de8f.json | Fix status code in webflux.adoc | src/docs/asciidoc/web/webflux.adoc | @@ -3612,7 +3612,7 @@ as the following example shows:
There are three variants for checking conditional requests against `eTag` values, `lastModified`
values, or both. For conditional `GET` and `HEAD` requests, you can set the response to
304 (NOT_MODIFIED). For conditional `POST`, `PUT`, and `DELETE`, you can inste... | false |
Other | spring-projects | spring-framework | 3a48682226615aaea3b63755c25763877c35dfd8.json | Replace ReadCancellationException with takeWhile
Closes gh-24125 | spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.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.
@@ -264,18 +264,11 @@ private static <T> Suppli... | false |
Other | spring-projects | spring-framework | 797f618f2b2e96bc0bc38028cd7126f0a0234391.json | Remove mismatched marker in core-beans.adoc
Closes gh-24132 | src/docs/asciidoc/core/core-beans.adoc | @@ -5400,7 +5400,6 @@ The following example shows corresponding bean definitions.
is qualified with the same value.
<2> The bean with the `action` qualifier value is wired with the constructor argument that
is qualified with the same value.
-====
For a fallback match, the bean name is considered a default qualifi... | false |
Other | spring-projects | spring-framework | fb13f6f0bc300ac8001d5cfc53b89f6136be0569.json | Add integration test for gh-24110 | spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java | @@ -516,6 +516,20 @@ void getMergedAnnotationWithImplicitAliasesInMetaAnnotationOnComposedAnnotation(
assertThat(isAnnotated(element, name)).isTrue();
}
+ @Test
+ void getMergedAnnotationWithImplicitAliasesWithDefaultsInMetaAnnotationOnComposedAnnotation() {
+ Class<?> element = ImplicitAliasesWithDefaultsClass... | false |
Other | spring-projects | spring-framework | 35b7f3bf343c08b91053e0b3012df21c0f52978a.json | Unpublish Gradle metadata
See gh-23503 | settings.gradle | @@ -4,7 +4,6 @@ pluginManagement {
maven { url 'https://repo.spring.io/plugins-release' }
}
}
-enableFeaturePreview("GRADLE_METADATA")
apply from: "$rootDir/gradle/build-cache-settings.gradle"
include "spring-aop" | false |
Other | spring-projects | spring-framework | 50ac8ad8b7d292066e38f5452d60ce81563eafa7.json | Fix checkstyle violation | spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultWebClientTests.java | @@ -20,8 +20,6 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.function.Consumer;
import java.util.function.Predicate;
import org.junit.jupiter.api.BeforeEach;
@@ -38,8 +36,6 @@
import org.springframework.http.... | false |
Other | spring-projects | spring-framework | a15a726fef4be798a24250003f57b9e88f869058.json | Improve getMultipartContentType in mock request.
See gh-24074 | spring-test/src/main/java/org/springframework/mock/web/MockMultipartHttpServletRequest.java | @@ -16,13 +16,16 @@
package org.springframework.mock.web;
+import java.io.IOException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import jav... | true |
Other | spring-projects | spring-framework | a15a726fef4be798a24250003f57b9e88f869058.json | Improve getMultipartContentType in mock request.
See gh-24074 | spring-test/src/test/java/org/springframework/mock/web/MockMultipartHttpServletRequestTests.java | @@ -27,6 +27,8 @@
import org.junit.jupiter.api.Test;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
import org.springframework.util.FileCopyUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile;
@@ -61,6 +63,24 @@ vo... | true |
Other | spring-projects | spring-framework | b44daa8b71a60b46da90c9fcd5b7ad13d2047167.json | Remove the few remaining usages of UriTemplate
Also update Javadoc of UriTemplate to point to UriComponentsBuilder and
UriBuilderFactory as more flexible options.
See gh-24094 | spring-web/src/main/java/org/springframework/http/RequestEntity.java | @@ -44,9 +44,13 @@
* </pre>
*
* <p>If you would like to provide a URI template with variables, consider using
- * {@link org.springframework.web.util.UriTemplate}:
+ * {@link org.springframework.web.util.DefaultUriBuilderFactory DefaultUriBuilderFactory}:
* <pre class="code">
- * URI uri = new UriTemplate("... | true |
Other | spring-projects | spring-framework | b44daa8b71a60b46da90c9fcd5b7ad13d2047167.json | Remove the few remaining usages of UriTemplate
Also update Javadoc of UriTemplate to point to UriComponentsBuilder and
UriBuilderFactory as more flexible options.
See gh-24094 | spring-web/src/main/java/org/springframework/web/util/UriTemplate.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.
@@ -30,14 +30,19 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | b44daa8b71a60b46da90c9fcd5b7ad13d2047167.json | Remove the few remaining usages of UriTemplate
Also update Javadoc of UriTemplate to point to UriComponentsBuilder and
UriBuilderFactory as more flexible options.
See gh-24094 | spring-web/src/test/java/org/springframework/http/RequestEntityTests.java | @@ -27,7 +27,7 @@
import org.junit.jupiter.api.Test;
import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.web.util.UriTemplate;
+import org.springframework.web.util.UriComponentsBuilder;
import static org.assertj.core.api.Assertions.assertThat;
@@ -58,23 +58,23 @@ public void... | true |
Other | spring-projects | spring-framework | b44daa8b71a60b46da90c9fcd5b7ad13d2047167.json | Remove the few remaining usages of UriTemplate
Also update Javadoc of UriTemplate to point to UriComponentsBuilder and
UriBuilderFactory as more flexible options.
See gh-24094 | spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RequestContext.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.
@@ -37,7 +37,7 @@
import org.springframework.w... | true |
Other | spring-projects | spring-framework | b44daa8b71a60b46da90c9fcd5b7ad13d2047167.json | Remove the few remaining usages of UriTemplate
Also update Javadoc of UriTemplate to point to UriComponentsBuilder and
UriBuilderFactory as more flexible options.
See gh-24094 | spring-webflux/src/test/java/org/springframework/web/reactive/result/view/DummyMacroRequestContext.java | @@ -22,7 +22,8 @@
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.ui.ModelMap;
import org.springframework.web.server.ServerWebExchange;
-import org.springframework.web.util.UriTemplate;
+import org.springframework.web.util.UriComponents;
+import org.springframework.we... | true |
Other | spring-projects | spring-framework | b44daa8b71a60b46da90c9fcd5b7ad13d2047167.json | Remove the few remaining usages of UriTemplate
Also update Javadoc of UriTemplate to point to UriComponentsBuilder and
UriBuilderFactory as more flexible options.
See gh-24094 | spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.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.
@@ -50,7 +50,7 @@
import org.springframework.w... | true |
Other | spring-projects | spring-framework | b44daa8b71a60b46da90c9fcd5b7ad13d2047167.json | Remove the few remaining usages of UriTemplate
Also update Javadoc of UriTemplate to point to UriComponentsBuilder and
UriBuilderFactory as more flexible options.
See gh-24094 | spring-webmvc/src/test/java/org/springframework/web/servlet/view/DummyMacroRequestContext.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,7 +23,8 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | 4aa013c5083fa1ccc1ca5ea77b43d4d41fb6a8be.json | Remove duplicate checks in ResponseCookieTests | spring-web/src/test/java/org/springframework/http/ResponseCookieTests.java | @@ -72,7 +72,7 @@ public void domainChecks() {
Arrays.asList("abc", "abc.org", "abc-def.org", "abc3.org", ".abc.org")
.forEach(domain -> ResponseCookie.from("n", "v").domain(domain).build());
- Arrays.asList("-abc.org", "abc.org.", "abc.org-", "-abc.org", "abc.org-")
+ Arrays.asList("-abc.org", "abc.org.", ... | false |
Other | spring-projects | spring-framework | 62ca7c4e8fa26d7eaa413c57aa232321d94d47f8.json | Hoist constant byte[] out of loop | spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java | @@ -208,7 +208,7 @@ private PropertyDescriptor findExistingPropertyDescriptor(String propertyName, C
}
private String propertyNameFor(Method method) {
- return Introspector.decapitalize(method.getName().substring(3, method.getName().length()));
+ return Introspector.decapitalize(method.getName().substring(3));
... | false |
Other | spring-projects | spring-framework | 26d800cc936a9e1f6d326c3b48022267bb30ed0f.json | Fix empty payload handling in RSocketRequester
Closes gh-24088 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequester.java | @@ -57,7 +57,7 @@ final class DefaultRSocketRequester implements RSocketRequester {
private final RSocketStrategies strategies;
- private final DataBuffer emptyDataBuffer;
+ private final Mono<DataBuffer> emptyBufferMono;
DefaultRSocketRequester(
@@ -73,7 +73,7 @@ final class DefaultRSocketRequester impleme... | true |
Other | spring-projects | spring-framework | 26d800cc936a9e1f6d326c3b48022267bb30ed0f.json | Fix empty payload handling in RSocketRequester
Closes gh-24088 | spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterTests.java | @@ -145,15 +145,6 @@ public void sendWithoutData() {
assertThat(this.rsocket.getSavedPayload().getDataUtf8()).isEqualTo("");
}
- @Test
- public void sendMonoWithoutData() {
- this.requester.route("toA").retrieveMono(String.class).block(Duration.ofSeconds(5));
-
- assertThat(this.rsocket.getSavedMethodName()).i... | true |
Other | spring-projects | spring-framework | 0865abef83fedd24a48812e96a336301fba9fbed.json | Expose current cached session count
Closes gh-26811 | spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -179,6 +179,23 @@ public boolean isCacheCons... | false |
Other | spring-projects | spring-framework | aa51ed19403129bd9f0b8f5373391ba6bc8baaaa.json | Fix failing tests
This commit ensures that if an Origin is returned as it was provided,
possibly with a trailing slash.
See gh-26892 | spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java | @@ -549,31 +549,31 @@ private List<OriginPattern> combinePatterns(
/**
* Check the origin of the request against the configured allowed origins.
- * @param requestOrigin the origin to check
+ * @param origin the origin to check
* @return the origin to use for the response, or {@code null} which
* means t... | true |
Other | spring-projects | spring-framework | aa51ed19403129bd9f0b8f5373391ba6bc8baaaa.json | Fix failing tests
This commit ensures that if an Origin is returned as it was provided,
possibly with a trailing slash.
See gh-26892 | spring-web/src/test/java/org/springframework/web/cors/CorsConfigurationTests.java | @@ -294,12 +294,12 @@ public void checkOriginAllowed() {
// specific origin matches Origin header with or without trailing "/"
config.setAllowedOrigins(Collections.singletonList("https://domain.com"));
assertThat(config.checkOrigin("https://domain.com")).isEqualTo("https://domain.com");
- assertThat(config.ch... | true |
Other | spring-projects | spring-framework | aa51ed19403129bd9f0b8f5373391ba6bc8baaaa.json | Fix failing tests
This commit ensures that if an Origin is returned as it was provided,
possibly with a trailing slash.
See gh-26892 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java | @@ -284,7 +284,7 @@ void classLevelComposedAnnotation(TestRequestMappingInfoHandlerMapping mapping)
CorsConfiguration config = getCorsConfiguration(chain, false);
assertThat(config).isNotNull();
assertThat(config.getAllowedMethods()).containsExactly("GET");
- assertThat(config.getAllowedOrigins()).containsExa... | true |
Other | spring-projects | spring-framework | 29790d5bb132435752a582ea449776afe2808bb2.json | Update docs on how a `@ModelAttribute` is sourced
Closes gh-26873 | src/docs/asciidoc/web/webmvc.adoc | @@ -2622,33 +2622,41 @@ query parameters and form fields. The following example shows how to do so:
.Java
----
@PostMapping("/owners/{ownerId}/pets/{petId}/edit")
- public String processSubmit(@ModelAttribute Pet pet) { } <1>
+ public String processSubmit(@ModelAttribute Pet pet) {
+ // method logic...
+ }
----
-... | false |
Other | spring-projects | spring-framework | dddcc5e9adaad0a85ae40664317e501c0cdf46aa.json | Ignore trailing slash in Origin header
See gh-26892 | spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java | @@ -551,6 +551,9 @@ public String checkOrigin(@Nullable String requestOrigin) {
if (!StringUtils.hasText(requestOrigin)) {
return null;
}
+ if (requestOrigin.endsWith("/")) {
+ requestOrigin = requestOrigin.substring(0, requestOrigin.length() - 1);
+ }
if (!ObjectUtils.isEmpty(this.allowedOrigins)) {
... | true |
Other | spring-projects | spring-framework | dddcc5e9adaad0a85ae40664317e501c0cdf46aa.json | Ignore trailing slash in Origin header
See gh-26892 | spring-web/src/test/java/org/springframework/web/cors/CorsConfigurationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -291,6 +291,7 @@ public void checkOriginAllo... | true |
Other | spring-projects | spring-framework | dddcc5e9adaad0a85ae40664317e501c0cdf46aa.json | Ignore trailing slash in Origin header
See gh-26892 | spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -170,10 +170,19 @@ public void actualRequest... | true |
Other | spring-projects | spring-framework | dddcc5e9adaad0a85ae40664317e501c0cdf46aa.json | Ignore trailing slash in Origin header
See gh-26892 | spring-web/src/test/java/org/springframework/web/cors/reactive/DefaultCorsProcessorTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -172,10 +172,22 @@ public void actualRequest... | true |
Other | spring-projects | spring-framework | 582b94d50ec880d06fecd506305c412c2a89b933.json | Allow charset input in WebClientResponseException
Closes gh-26866 | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultClientResponse.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
package org.springframework.... | true |
Other | spring-projects | spring-framework | 582b94d50ec880d06fecd506305c412c2a89b933.json | Allow charset input in WebClientResponseException
Closes gh-26866 | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/UnknownHttpStatusCodeException.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ public UnknownHttpStatusCodeE... | true |
Other | spring-projects | spring-framework | 582b94d50ec880d06fecd506305c412c2a89b933.json | Allow charset input in WebClientResponseException
Closes gh-26866 | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,6 +43,7 @@ public class WebClientRespons... | true |
Other | spring-projects | spring-framework | d30432b6c07ab4d180f70222aabdfafe9359f026.json | Fix syntax in toolchains example
See gh-25787 | gradle/toolchains.gradle | @@ -25,7 +25,7 @@
* /opt/openjdk/java11
* $ echo JDK15
* /opt/openjdk/java15
- * $ ./gradlew -Dorg.gradle.java.installations.fromEnv=JDK11,JDK15 check
+ * $ ./gradlew -Porg.gradle.java.installations.fromEnv=JDK11,JDK15 check
* }
*
* @author Brian Clozel | false |
Other | spring-projects | spring-framework | 668b93883234d9ba2ee7f88be39277c2e3762a62.json | Remove obsolete order.xsd file
The order.xsd is no longer used by any tests and probably has not been
since commit 89a7e752ef, which removed support for Castor.
See gh-22250 | spring-oxm/src/test/resources/org/springframework/oxm/order.xsd | @@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
- targetNamespace="https://samples.springframework.org/order"
- xmlns:tns="https://samples.springframework.org/order">
- <element name="order">
- <complexType... | false |
Other | spring-projects | spring-framework | 091e7bb8913d1b2bfda707fcde20adda0d70b98f.json | Remove duplicate copy of flight.xsd
See 85eb589c2ed03dd22af1259e5b0161ea70f47488
See gh-25787 | spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@
import org.junit.jupiter.api... | true |
Other | spring-projects | spring-framework | 091e7bb8913d1b2bfda707fcde20adda0d70b98f.json | Remove duplicate copy of flight.xsd
See 85eb589c2ed03dd22af1259e5b0161ea70f47488
See gh-25787 | spring-oxm/src/test/resources/org/springframework/oxm/flight.xsd | @@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
- targetNamespace="http://samples.springframework.org/flight"
- xmlns:tns="http://samples.springframework.org/flight">
- <element name="flights">
- <complexTy... | true |
Other | spring-projects | spring-framework | 55faf6e3205d26a4ba693f40c1ea1cef179f31cb.json | Use HttpMethod enums
See gh-26855 | spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java | @@ -49,6 +49,7 @@
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.core.log.LogFormatUtils;
+import org.springframework.http.HttpMethod;
import org.springframework.http.server.RequestPath;
import org.springframework.h... | false |
Other | spring-projects | spring-framework | a522ed078849fae924ba5706beb30a6b3d85fc2c.json | Fix task parameters in CI build pipeline
Prior to this commit, the task parameters for the CI project checks were
overridden by a task anchor. This commit splits the anchor declaration
and ensures that the `TEST_TOOLCHAIN` setting is set for the JDK
variant builds.
See gh-25787 | ci/pipeline.yml | @@ -18,9 +18,6 @@ anchors:
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
build-project-task-params: &build-project-task-params
- privileged: true
- timeout: ((task-timeout))
- params:
BRANCH: ((branch))
<<: *gradle-enterprise-task-param... | false |
Other | spring-projects | spring-framework | 5b96c9b87e0744ef4011cec403f5470ce017315e.json | Update @since tag due to backport
See gh-26856 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ModelAttributeMethodArgumentResolver.java | @@ -147,7 +147,7 @@ public Mono<Object> resolveArgument(
/**
* Determine if binding should be disabled for the supplied {@link MethodParameter},
* based on the {@link ModelAttribute#binding} annotation attribute.
- * @since 5.3.7
+ * @since 5.2.15
*/
private boolean bindingDisabled(MethodParameter parame... | false |
Other | spring-projects | spring-framework | a2d91a562de7ab3e0d4ccbe2b1dbadb8f5324156.json | Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See section 2.2 of RFC 5789.
Closes gh-26759 | spring-web/src/main/java/org/springframework/web/server/UnsupportedMediaTypeStatusException.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,9 +20,12 @@
import java.util.List;
i... | true |
Other | spring-projects | spring-framework | a2d91a562de7ab3e0d4ccbe2b1dbadb8f5324156.json | Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See section 2.2 of RFC 5789.
Closes gh-26759 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java | @@ -190,7 +190,7 @@ protected HandlerMethod handleNoMatch(Set<RequestMappingInfo> infos,
catch (InvalidMediaTypeException ex) {
throw new UnsupportedMediaTypeStatusException(ex.getMessage());
}
- throw new UnsupportedMediaTypeStatusException(contentType, new ArrayList<>(mediaTypes));
+ throw new Unsupp... | true |
Other | spring-projects | spring-framework | a2d91a562de7ab3e0d4ccbe2b1dbadb8f5324156.json | Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See section 2.2 of RFC 5789.
Closes gh-26759 | spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java | @@ -317,6 +317,26 @@ public void handleMatchMatrixVariablesDecoding() {
assertThat(uriVariables.get("cars")).isEqualTo("cars");
}
+ @Test
+ public void handlePatchUnsupportedMediaType() {
+ MockServerHttpRequest request = MockServerHttpRequest.patch("/qux")
+ .header("content-type", "application/xml")
+ .... | true |
Other | spring-projects | spring-framework | a2d91a562de7ab3e0d4ccbe2b1dbadb8f5324156.json | Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See section 2.2 of RFC 5789.
Closes gh-26759 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -231,6 +231,12 @@ protected ResponseEntity<O... | true |
Other | spring-projects | spring-framework | a2d91a562de7ab3e0d4ccbe2b1dbadb8f5324156.json | Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See section 2.2 of RFC 5789.
Closes gh-26759 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java | @@ -281,6 +281,9 @@ protected ModelAndView handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupported
List<MediaType> mediaTypes = ex.getSupportedMediaTypes();
if (!CollectionUtils.isEmpty(mediaTypes)) {
response.setHeader("Accept", MediaType.toString(mediaTypes));
+ if (request.getMethod().equals("PATCH")) ... | true |
Other | spring-projects | spring-framework | a2d91a562de7ab3e0d4ccbe2b1dbadb8f5324156.json | Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See section 2.2 of RFC 5789.
Closes gh-26759 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandlerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -113,6 +113,20 @@ public void handleHttpMedi... | true |
Other | spring-projects | spring-framework | a2d91a562de7ab3e0d4ccbe2b1dbadb8f5324156.json | Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See section 2.2 of RFC 5789.
Closes gh-26759 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -976,6 +976,26 @@ void unsupportedRequestBod... | true |
Other | spring-projects | spring-framework | a2d91a562de7ab3e0d4ccbe2b1dbadb8f5324156.json | Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See section 2.2 of RFC 5789.
Closes gh-26759 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java | @@ -87,6 +87,18 @@ public void handleHttpMediaTypeNotSupported() {
assertThat(response.getHeader("Accept")).as("Invalid Accept header").isEqualTo("application/pdf");
}
+ @Test
+ public void patchHttpMediaTypeNotSupported() {
+ HttpMediaTypeNotSupportedException ex = new HttpMediaTypeNotSupportedException(new Me... | true |
Other | spring-projects | spring-framework | 97f3846971ec2e9338d8f3eccfe4ea30250e8647.json | Support "Accept-Patch" for OPTIONS requests
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of
RFC 5789.
See gh-26759 | spring-web/src/main/java/org/springframework/http/HttpHeaders.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -99,6 +99,12 @@ public class HttpHeaders imp... | true |
Other | spring-projects | spring-framework | 97f3846971ec2e9338d8f3eccfe4ea30250e8647.json | Support "Accept-Patch" for OPTIONS requests
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of
RFC 5789.
See gh-26759 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@
import org.springframework.h... | true |
Other | spring-projects | spring-framework | 97f3846971ec2e9338d8f3eccfe4ea30250e8647.json | Support "Accept-Patch" for OPTIONS requests
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of
RFC 5789.
See gh-26759 | spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,13 +37,15 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | 97f3846971ec2e9338d8f3eccfe4ea30250e8647.json | Support "Accept-Patch" for OPTIONS requests
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of
RFC 5789.
See gh-26759 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMapping.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -244,7 +244,8 @@ protected HandlerMethod han... | true |
Other | spring-projects | spring-framework | 97f3846971ec2e9338d8f3eccfe4ea30250e8647.json | Support "Accept-Patch" for OPTIONS requests
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of
RFC 5789.
See gh-26759 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMappingTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
import java.util.HashSet;
i... | true |
Other | spring-projects | spring-framework | 7adac25e7e87f66c1291c5543501c31171bb47ec.json | Update copyright year of changed file
See gh-26776 | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/CorsRegistration.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. | false |
Other | spring-projects | spring-framework | 58e40d1aa2c23f6d9c41d4289f5b5debc10868f6.json | Add awaitBodyOrNull to WebClient.ResponseSpec
Such variant is already provided for ClientResponse but not
for WebClient.ResponseSpec.
Closes gh-26731 | spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/WebClientExtensions.kt | @@ -21,6 +21,7 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.asFlow
import kotlinx.coroutines.reactive.awaitSingle
import kotlinx.coroutines.reactive.awaitSingle
+import kotlinx.coroutines.reactive.awaitSingleOrNull
import kotlinx.coroutines.reactor.asFlux
import kotlinx.coroutines.reac... | true |
Other | spring-projects | spring-framework | 58e40d1aa2c23f6d9c41d4289f5b5debc10868f6.json | Add awaitBodyOrNull to WebClient.ResponseSpec
Such variant is already provided for ClientResponse but not
for WebClient.ResponseSpec.
Closes gh-26731 | spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/client/WebClientExtensionsTests.kt | @@ -136,6 +136,25 @@ class WebClientExtensionsTests {
}
}
+ @Test
+ fun awaitBodyOrNull() {
+ val spec = mockk<WebClient.ResponseSpec>()
+ every { spec.bodyToMono<String>() } returns Mono.just("foo")
+ runBlocking {
+ assertThat(spec.awaitBodyOrNull<String>()).isEqualTo("foo")
+ }
+ }
+
+ @Test
+ fun `awai... | true |
Other | spring-projects | spring-framework | 85dbd2a4c3765312847595e0064e2b352800ea85.json | Upgrade Kotlin to 1.4.32 | build.gradle | @@ -1,7 +1,7 @@
plugins {
id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
id 'io.spring.nohttp' version '0.0.5.RELEASE'
- id 'org.jetbrains.kotlin.jvm' version '1.4.31' apply false
+ id 'org.jetbrains.kotlin.jvm' version '1.4.32' apply false
id 'org.jetbrains.dokka' version '0.10.1' appl... | false |
Other | spring-projects | spring-framework | 5e1e29a2dd6e94d7221aa90d21e052ffdc824a06.json | Fix failing tests
See gh-26746 | spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/AbstractDataBufferAllocatingTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
import java.lang.annotation.... | true |
Other | spring-projects | spring-framework | 5e1e29a2dd6e94d7221aa90d21e052ffdc824a06.json | Fix failing tests
See gh-26746 | spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -150,8 +150,12 @@ void writePojo(String disp... | true |
Other | spring-projects | spring-framework | f982fd99d7d3bed6e879b00f7599cb8c587228cc.json | Fix timezone offset in CronExpressionTests
Closes gh-26744 | spring-context/src/test/java/org/springframework/scheduling/support/CronExpressionTests.java | @@ -1266,13 +1266,13 @@ public void daylightSaving() {
CronExpression cronExpression = CronExpression.parse("0 0 9 * * *");
ZonedDateTime last = ZonedDateTime.parse("2021-03-27T09:00:00+01:00[Europe/Amsterdam]");
- ZonedDateTime expected = ZonedDateTime.parse("2021-03-28T09:00:00+01:00[Europe/Amsterdam]");
+ ... | false |
Other | spring-projects | spring-framework | ab18ab60250e256da4b1502e1786b168c374a229.json | Fix CronExpression issue with ZonedDateTime & DST
This commit fixes an issue with CronExpression when used in combination
with ZonedDateTime and daylight saving time.
Closes gh-26744 | spring-context/src/main/java/org/springframework/scheduling/support/CronField.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -237,7 +237,12 @@ public int checkValidValue... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.