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 | d1db249584c16e17ca94185e18e8da916d56190a.json | Fix regression in client codecs
Restore the correct client-side default for whether StringDecoder
should split on new lines. It is true forthe server and false for the
client by default.
The regression was introduced in the recent refactoring:
https://github.com/spring-projects/spring-framework/commit/f8a21ab11bf1eca... | spring-web/src/main/java/org/springframework/http/codec/AbstractCodecConfigurer.java | @@ -181,7 +181,7 @@ protected void addDefaultObjectWriters(List<HttpMessageWriter<?>> result) {
/**
* A registry and a factory for built-in HTTP message readers and writers.
*/
- public static class DefaultCodecConfigurer {
+ public abstract static class DefaultCodecConfigurer {
private boolean suppressed ... | true |
Other | spring-projects | spring-framework | d1db249584c16e17ca94185e18e8da916d56190a.json | Fix regression in client codecs
Restore the correct client-side default for whether StringDecoder
should split on new lines. It is true forthe server and false for the
client by default.
The regression was introduced in the recent refactoring:
https://github.com/spring-projects/spring-framework/commit/f8a21ab11bf1eca... | spring-web/src/main/java/org/springframework/http/codec/ClientCodecConfigurer.java | @@ -18,6 +18,7 @@
import java.util.List;
import org.springframework.core.codec.Decoder;
+import org.springframework.core.codec.StringDecoder;
import org.springframework.http.codec.json.Jackson2JsonDecoder;
/**
@@ -79,6 +80,14 @@ public void serverSentEventDecoder(Decoder<?> decoder) {
// Internal methods f... | true |
Other | spring-projects | spring-framework | d1db249584c16e17ca94185e18e8da916d56190a.json | Fix regression in client codecs
Restore the correct client-side default for whether StringDecoder
should split on new lines. It is true forthe server and false for the
client by default.
The regression was introduced in the recent refactoring:
https://github.com/spring-projects/spring-framework/commit/f8a21ab11bf1eca... | spring-web/src/main/java/org/springframework/http/codec/ServerCodecConfigurer.java | @@ -18,6 +18,7 @@
import java.util.List;
import org.springframework.core.codec.Encoder;
+import org.springframework.core.codec.StringDecoder;
import org.springframework.http.codec.json.Jackson2JsonEncoder;
/**
@@ -78,6 +79,14 @@ public void serverSentEventEncoder(Encoder<?> encoder) {
// Internal methods f... | true |
Other | spring-projects | spring-framework | d1db249584c16e17ca94185e18e8da916d56190a.json | Fix regression in client codecs
Restore the correct client-side default for whether StringDecoder
should split on new lines. It is true forthe server and false for the
client by default.
The regression was introduced in the recent refactoring:
https://github.com/spring-projects/spring-framework/commit/f8a21ab11bf1eca... | spring-web/src/test/java/org/springframework/http/codec/ClientCodecConfigurerTests.java | @@ -15,11 +15,16 @@
*/
package org.springframework.http.codec;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Test;
+import reactor.core.publisher.Flux;
+import or... | true |
Other | spring-projects | spring-framework | d1db249584c16e17ca94185e18e8da916d56190a.json | Fix regression in client codecs
Restore the correct client-side default for whether StringDecoder
should split on new lines. It is true forthe server and false for the
client by default.
The regression was introduced in the recent refactoring:
https://github.com/spring-projects/spring-framework/commit/f8a21ab11bf1eca... | spring-web/src/test/java/org/springframework/http/codec/CodecConfigurerTests.java | @@ -282,7 +282,19 @@ private void assertStringEncoder(Encoder<?> encoder, boolean textOnly) {
private static class TestCodecConfigurer extends AbstractCodecConfigurer {
private TestCodecConfigurer() {
- super(new DefaultCodecConfigurer());
+ super(new TestDefaultCodecConfigurer());
+ }
+
+
+ private static... | true |
Other | spring-projects | spring-framework | d1db249584c16e17ca94185e18e8da916d56190a.json | Fix regression in client codecs
Restore the correct client-side default for whether StringDecoder
should split on new lines. It is true forthe server and false for the
client by default.
The regression was introduced in the recent refactoring:
https://github.com/spring-projects/spring-framework/commit/f8a21ab11bf1eca... | spring-web/src/test/java/org/springframework/http/codec/ServerCodecConfigurerTests.java | @@ -15,11 +15,17 @@
*/
package org.springframework.http.codec;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Test;
+import reactor.core.pu... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/appendix.adoc | @@ -3,7 +3,8 @@
:doc-root: https://docs.spring.io
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
:wiki-spring-framework: https://github.com/spring-projects/spring-framework/wiki
-
+:toc: left
+:toclevels: 2
[[spring-whats-new]]
== What's New in the Spring... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/core.adoc | @@ -2,9 +2,9 @@
= Core Technologies
:doc-root: https://docs.spring.io
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
+:toc: left
+:toclevels: 2
-[partintro]
---
This part of the reference documentation covers all of those technologies that are
absolutely ... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/core/core-aop.adoc | @@ -259,8 +259,9 @@ element:
<aop:aspectj-autoproxy/>
----
-This assumes that you are using schema support as described in <<xsd-configuration>>. See
-<<xsd-config-body-schemas-aop>> for how to import the tags in the `aop` namespace.
+This assumes that you are using schema support as described in <<appendix.adoc#x... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/core/core-beans.adoc | @@ -6,7 +6,8 @@
== Introduction to the Spring IoC container and beans
This chapter covers the Spring Framework implementation of the Inversion of Control
-(IoC) footnote:[See pass:specialcharacters,macros[<<background-ioc>>] ] principle. IoC
+(IoC) footnote:[See pass:specialcharacters,macros[<<overview.adoc#backgro... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/core/core-validation.adoc | @@ -1,10 +1,7 @@
-
[[validation]]
= Validation, Data Binding, and Type Conversion
-
-
[[validation-introduction]]
== Introduction
@@ -666,7 +663,7 @@ Next we configure a `CustomEditorConfigurer` and inject an instance of our
----
Finally, and in a bit of a departure from the focus of this chapter, for tho... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/data-access.adoc | @@ -2,24 +2,16 @@
= Data Access
:doc-root: https://docs.spring.io
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
+:toc: left
+:toclevels: 2
-[partintro]
---
This part of the reference documentation is concerned with data access and the
interaction between... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/index.adoc | @@ -4,16 +4,33 @@ The Spring Framework team and contributors https://github.com/spring-projects/sp
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
-<<overview.adoc#spring-introduction,Overview>>
+The Spring Framework is a lightweight solution and a potential... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/integration.adoc | @@ -4,23 +4,12 @@
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
:doc-spring-amqp: {doc-root}/spring-amqp/docs/current/reference
:doc-spring-gemfire: {doc-root}/spring-gemfire/docs/current/reference
+:toc: left
+:toclevels: 2
-[partintro]
---
This part of ... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/overview.adoc | @@ -2,34 +2,8 @@
= Overview of Spring Framework
:doc-root: https://docs.spring.io
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
-
-[partintro]
---
-The Spring Framework is a lightweight solution and a potential one-stop-shop for
-building your enterprise-rea... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/testing.adoc | @@ -3,9 +3,9 @@
:doc-root: https://docs.spring.io
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
:doc-spring-boot: {doc-root}/spring-boot/docs/current/reference
+:toc: left
+:toclevels: 2
-[partintro]
---
The adoption of the test-driven-development (TDD) a... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/web.adoc | @@ -2,9 +2,9 @@
= The Web
:doc-root: https://docs.spring.io
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
+:toc: left
+:toclevels: 2
-[partintro]
---
This part of the reference documentation covers Spring Framework's support for the
presentation tier (an... | true |
Other | spring-projects | spring-framework | dea4825a9fcf8e7958d13b04417aab7234b05c0a.json | Fix link references between documents
Issue: SPR-14997 | src/docs/asciidoc/web/web-mvc.adoc | @@ -30,8 +30,8 @@ the first edition. Alternatively, see
You cannot add advice to final methods when you use Spring MVC. For example, you cannot
add advice to the `AbstractController.setSynchronizeOnSession()` method. Refer to
-<<aop-understanding-aop-proxies>> for more information on AOP proxies and why you cannot
... | true |
Other | spring-projects | spring-framework | 525f30ad5e9bac3ed5e55b577ce779c0d021db1d.json | Remove dated references on URI template RFC | spring-web/src/main/java/org/springframework/web/util/UriTemplate.java | @@ -30,7 +30,7 @@
/**
* Represents a URI template. A URI template is a URI-like String that contains variables
- * enclosed by braces ({@code {}}), which can be expanded to produce an actual URI.
+ * enclosed by braces ({@code {}}) which can be expanded to produce an actual URI.
*
* <p>See {@link #expand(Map)}... | true |
Other | spring-projects | spring-framework | 525f30ad5e9bac3ed5e55b577ce779c0d021db1d.json | Remove dated references on URI template RFC | src/asciidoc/web-mvc.adoc | @@ -771,9 +771,7 @@ __URI templates__ can be used for convenient access to selected parts of a URL i
`@RequestMapping` method.
A URI Template is a URI-like string, containing one or more variable names. When you
-substitute values for these variables, the template becomes a URI. The
-http://bitworking.org/projects/... | true |
Other | spring-projects | spring-framework | 88e3665d9dafb820511438c5a73f2532d13c5bab.json | Update Apache Licence 2.0 URL
Closes gh-1278 | gradle/publish-maven.gradle | @@ -29,8 +29,8 @@ def customizePom(pom, gradleProject) {
}
licenses {
license {
- name "The Apache Software License, Version 2.0"
- url "http://www.apache.org/licenses/LICENSE-2.0.txt"
+ name "Apache License, Version 2.0"
+ url "http://www.apache.org/licenses/LICENSE-2.0"
distribution... | false |
Other | spring-projects | spring-framework | c8fd4cb5840f02881a6e201767c9609642c08c86.json | Remove a redundant word
Closes gh-1361 | spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -97,8 +97,8 @@ public class ServletTestExecu... | false |
Other | spring-projects | spring-framework | 2baceac5ff03489628e058c76a35306519e6cbb2.json | Resolve ResourceUrlProvider from current request
This commit changes `ResourceTransformerSupport` to look for the
`ResourceUrlProvider` in the current request if none is configured on
the resource transformer itself.
Issue: SPR-15369 | spring-webflux/src/main/java/org/springframework/web/reactive/resource/AppCacheManifestTransformer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -144,7 +144,7 @@ private Mono<LineOutput> pr... | true |
Other | spring-projects | spring-framework | 2baceac5ff03489628e058c76a35306519e6cbb2.json | Resolve ResourceUrlProvider from current request
This commit changes `ResourceTransformerSupport` to look for the
`ResourceUrlProvider` in the current request if none is configured on
the resource transformer itself.
Issue: SPR-15369 | spring-webflux/src/main/java/org/springframework/web/reactive/resource/CssLinkResourceTransformer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -103,7 +103,7 @@ public Mono<Resource> trans... | true |
Other | spring-projects | spring-framework | 2baceac5ff03489628e058c76a35306519e6cbb2.json | Resolve ResourceUrlProvider from current request
This commit changes `ResourceTransformerSupport` to look for the
`ResourceUrlProvider` in the current request if none is configured on
the resource transformer itself.
Issue: SPR-15369 | spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceTransformerSupport.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -89,11 +89,11 @@ protected Mono<String> reso... | true |
Other | spring-projects | spring-framework | 2baceac5ff03489628e058c76a35306519e6cbb2.json | Resolve ResourceUrlProvider from current request
This commit changes `ResourceTransformerSupport` to look for the
`ResourceUrlProvider` in the current request if none is configured on
the resource transformer itself.
Issue: SPR-15369 | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerSupport.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,15 +38,8 @@ public abstract class Resour... | true |
Other | spring-projects | spring-framework | fd1db57e058c240d6e953940b9147d233c9d85fe.json | Change MediaTypeFactory to return Optional
This commit changes the `MediaTypeFactory` to return
`Optional<MediaType>` (instead of a plain `MediaType`) for the
`getMediaType` methods.
Issue: SPR-14908 | spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java | @@ -263,14 +263,12 @@ public int getEffectiveMinorVersion() {
@Override
public String getMimeType(String filePath) {
String extension = StringUtils.getFilenameExtension(filePath);
- MediaType result;
if (this.mimeTypes.containsKey(extension)) {
- result = this.mimeTypes.get(extension);
+ return this.mime... | true |
Other | spring-projects | spring-framework | fd1db57e058c240d6e953940b9147d233c9d85fe.json | Change MediaTypeFactory to return Optional
This commit changes the `MediaTypeFactory` to return
`Optional<MediaType>` (instead of a plain `MediaType`) for the
`getMediaType` methods.
Issue: SPR-14908 | spring-web/src/main/java/org/springframework/http/MediaTypeFactory.java | @@ -103,19 +103,22 @@ private static MultiValueMap<String, MediaType> parseMimeTypes() {
* @param resource the resource to introspect
* @return the corresponding media type, or {@code null} if none found
*/
- public static MediaType getMediaType(Resource resource) {
+ public static Optional<MediaType> getMedia... | true |
Other | spring-projects | spring-framework | fd1db57e058c240d6e953940b9147d233c9d85fe.json | Change MediaTypeFactory to return Optional
This commit changes the `MediaTypeFactory` to return
`Optional<MediaType>` (instead of a plain `MediaType`) for the
`getMediaType` methods.
Issue: SPR-14908 | spring-web/src/main/java/org/springframework/http/codec/ResourceHttpMessageWriter.java | @@ -136,8 +136,7 @@ private static MediaType getResourceMediaType(MediaType type, Resource resource)
if (type != null && type.isConcrete() && !type.equals(MediaType.APPLICATION_OCTET_STREAM)) {
return type;
}
- type = MediaTypeFactory.getMediaType(resource);
- return type != null ? type : MediaType.APPLICAT... | true |
Other | spring-projects | spring-framework | fd1db57e058c240d6e953940b9147d233c9d85fe.json | Change MediaTypeFactory to return Optional
This commit changes the `MediaTypeFactory` to return
`Optional<MediaType>` (instead of a plain `MediaType`) for the
`getMediaType` methods.
Issue: SPR-14908 | spring-web/src/main/java/org/springframework/http/converter/ResourceHttpMessageConverter.java | @@ -102,8 +102,7 @@ public String getFilename() {
@Override
protected MediaType getDefaultContentType(Resource resource) {
- MediaType mediaType = MediaTypeFactory.getMediaType(resource);
- return mediaType != null ? mediaType : MediaType.APPLICATION_OCTET_STREAM;
+ return MediaTypeFactory.getMediaType(resourc... | true |
Other | spring-projects | spring-framework | fd1db57e058c240d6e953940b9147d233c9d85fe.json | Change MediaTypeFactory to return Optional
This commit changes the `MediaTypeFactory` to return
`Optional<MediaType>` (instead of a plain `MediaType`) for the
`getMediaType` methods.
Issue: SPR-14908 | spring-web/src/main/java/org/springframework/http/converter/ResourceRegionHttpMessageConverter.java | @@ -87,14 +87,7 @@ protected MediaType getDefaultContentType(Object object) {
resource = regions.iterator().next().getResource();
}
}
- MediaType result = null;
- if (resource != null) {
- result = MediaTypeFactory.getMediaType(resource);
- }
- if (result == null) {
- return MediaType.APPLICATION_OC... | true |
Other | spring-projects | spring-framework | fd1db57e058c240d6e953940b9147d233c9d85fe.json | Change MediaTypeFactory to return Optional
This commit changes the `MediaTypeFactory` to return
`Optional<MediaType>` (instead of a plain `MediaType`) for the
`getMediaType` methods.
Issue: SPR-14908 | spring-web/src/main/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategy.java | @@ -18,6 +18,7 @@
import java.util.Locale;
import java.util.Map;
+import java.util.Optional;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
@@ -112,9 +113,9 @@ protected String getMediaTypeKey(NativeWebRequest webRequest) {
protected MediaType handleNoMatch(NativeWebReque... | true |
Other | spring-projects | spring-framework | fd1db57e058c240d6e953940b9147d233c9d85fe.json | Change MediaTypeFactory to return Optional
This commit changes the `MediaTypeFactory` to return
`Optional<MediaType>` (instead of a plain `MediaType`) for the
`getMediaType` methods.
Issue: SPR-14908 | spring-web/src/test/java/org/springframework/http/MediaTypeFactoryTests.java | @@ -18,7 +18,9 @@
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
+import org.springframework.core.io.Resource;
+
+import static org.junit.Assert.*;
/**
* @author Arjen Poutsma
@@ -27,9 +29,17 @@ public class MediaTypeFactoryTests {
@Test
public void getMediaType() {
- assertEquals... | true |
Other | spring-projects | spring-framework | fd1db57e058c240d6e953940b9147d233c9d85fe.json | Change MediaTypeFactory to return Optional
This commit changes the `MediaTypeFactory` to return
`Optional<MediaType>` (instead of a plain `MediaType`) for the
`getMediaType` methods.
Issue: SPR-14908 | spring-web/src/test/java/org/springframework/mock/web/test/MockServletContext.java | @@ -262,14 +262,12 @@ public int getEffectiveMinorVersion() {
@Override
public String getMimeType(String filePath) {
String extension = StringUtils.getFilenameExtension(filePath);
- MediaType result;
if (this.mimeTypes.containsKey(extension)) {
- result = this.mimeTypes.get(extension);
+ return this.mime... | true |
Other | spring-projects | spring-framework | fd1db57e058c240d6e953940b9147d233c9d85fe.json | Change MediaTypeFactory to return Optional
This commit changes the `MediaTypeFactory` to return
`Optional<MediaType>` (instead of a plain `MediaType`) for the
`getMediaType` methods.
Issue: SPR-14908 | spring-webflux/src/main/java/org/springframework/web/reactive/accept/PathExtensionContentTypeResolver.java | @@ -18,6 +18,7 @@
import java.util.Locale;
import java.util.Map;
+import java.util.Optional;
import org.springframework.core.io.Resource;
import org.springframework.http.MediaType;
@@ -79,9 +80,9 @@ protected String extractKey(ServerWebExchange exchange) {
@Override
protected MediaType handleNoMatch(Strin... | true |
Other | spring-projects | spring-framework | 2896c5d2ab23b6faf1004d3e9aef18d23d790c04.json | Revise "streaming" MediaType support
Push the knowledge of what media types represent "streaming" down to
the Encoder level where knowledge is required (e.g. to encode a
JSON array vs a stream of JSON elements). | spring-web/src/main/java/org/springframework/http/codec/DecoderHttpMessageReader.java | @@ -129,13 +129,13 @@ public Mono<T> readMono(ResolvableType actualType, ResolvableType elementType,
/**
* Get additional hints for decoding for example based on the server request
* or annotations from controller method parameters. By default, delegate to
- * the decoder if it is an instance of {@link ServerH... | true |
Other | spring-projects | spring-framework | 2896c5d2ab23b6faf1004d3e9aef18d23d790c04.json | Revise "streaming" MediaType support
Push the knowledge of what media types represent "streaming" down to
the Encoder level where knowledge is required (e.g. to encode a
JSON array vs a stream of JSON elements). | spring-web/src/main/java/org/springframework/http/codec/EncoderHttpMessageWriter.java | @@ -16,7 +16,6 @@
package org.springframework.http.codec;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -49,22 +48,12 @@
*/
public class EncoderHttpMessageWriter<T> implements ServerHttpMessageWriter<T> {
- /**
- * Default list of media type... | true |
Other | spring-projects | spring-framework | 2896c5d2ab23b6faf1004d3e9aef18d23d790c04.json | Revise "streaming" MediaType support
Push the knowledge of what media types represent "streaming" down to
the Encoder level where knowledge is required (e.g. to encode a
JSON array vs a stream of JSON elements). | spring-web/src/main/java/org/springframework/http/codec/HttpDecoder.java | @@ -24,12 +24,13 @@
import org.springframework.http.server.reactive.ServerHttpResponse;
/**
- * {@code Decoder} extension for server-side decoding of the HTTP request body.
+ * Extension of {@code Decoder} exposing extra methods relevant in the context
+ * of HTTP applications.
*
* @author Rossen Stoyanchev
*... | true |
Other | spring-projects | spring-framework | 2896c5d2ab23b6faf1004d3e9aef18d23d790c04.json | Revise "streaming" MediaType support
Push the knowledge of what media types represent "streaming" down to
the Encoder level where knowledge is required (e.g. to encode a
JSON array vs a stream of JSON elements). | spring-web/src/main/java/org/springframework/http/codec/HttpEncoder.java | @@ -16,6 +16,8 @@
package org.springframework.http.codec;
+import java.util.Collections;
+import java.util.List;
import java.util.Map;
import org.springframework.core.ResolvableType;
@@ -26,12 +28,19 @@
/**
- * {@code Encoder} extension for server-side encoding of the HTTP response body.
+ * Extension of ... | true |
Other | spring-projects | spring-framework | 2896c5d2ab23b6faf1004d3e9aef18d23d790c04.json | Revise "streaming" MediaType support
Push the knowledge of what media types represent "streaming" down to
the Encoder level where knowledge is required (e.g. to encode a
JSON array vs a stream of JSON elements). | spring-web/src/main/java/org/springframework/http/codec/ServerSentEventHttpMessageReader.java | @@ -71,6 +71,13 @@ public ServerSentEventHttpMessageReader(Decoder<?> decoder) {
}
+ /**
+ * Return the configured {@code Decoder}.
+ */
+ public Decoder<?> getDecoder() {
+ return this.decoder;
+ }
+
@Override
public List<MediaType> getReadableMediaTypes() {
return Collections.singletonList(MediaType.T... | true |
Other | spring-projects | spring-framework | 2896c5d2ab23b6faf1004d3e9aef18d23d790c04.json | Revise "streaming" MediaType support
Push the knowledge of what media types represent "streaming" down to
the Encoder level where knowledge is required (e.g. to encode a
JSON array vs a stream of JSON elements). | spring-web/src/main/java/org/springframework/http/codec/ServerSentEventHttpMessageWriter.java | @@ -63,6 +63,13 @@ public ServerSentEventHttpMessageWriter(Encoder<?> encoder) {
}
+ /**
+ * Return the configured {@code Encoder}.
+ */
+ public Encoder<?> getEncoder() {
+ return this.encoder;
+ }
+
@Override
public List<MediaType> getWritableMediaTypes() {
return WRITABLE_MEDIA_TYPES;
@@ -154,8 +161,... | true |
Other | spring-projects | spring-framework | 2896c5d2ab23b6faf1004d3e9aef18d23d790c04.json | Revise "streaming" MediaType support
Push the knowledge of what media types represent "streaming" down to
the Encoder level where knowledge is required (e.g. to encode a
JSON array vs a stream of JSON elements). | spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonDecoder.java | @@ -33,7 +33,7 @@
import org.springframework.core.codec.CodecException;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferUtils;
-import org.springframework.http.codec.ServerHttpDecoder;
+import org.springframework.http.codec.HttpDecoder;
import org.springfram... | true |
Other | spring-projects | spring-framework | 2896c5d2ab23b6faf1004d3e9aef18d23d790c04.json | Revise "streaming" MediaType support
Push the knowledge of what media types represent "streaming" down to
the Encoder level where knowledge is required (e.g. to encode a
JSON array vs a stream of JSON elements). | spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonEncoder.java | @@ -19,6 +19,8 @@
import java.io.IOException;
import java.io.OutputStream;
import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -40,14 +42,13 @@
import org.springframework.core.io.buffer.DataBuffer;
import org.spring... | true |
Other | spring-projects | spring-framework | ba885f3d0b6284bdadb7d4026376296fc85324db.json | Add heartbeat lock to SockJS server sessions
Even before this change SockJS sessions always cancelled the heartbeat
task first prior to sending messages. However when the heartbeat task
is already in progress, cancellation of it is not enough and we must
wait until the heartbeat is sent.
This commit adds a heartbeat ... | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,8 @@
import java.util.Set;
impor... | true |
Other | spring-projects | spring-framework | ba885f3d0b6284bdadb7d4026376296fc85324db.json | Add heartbeat lock to SockJS server sessions
Even before this change SockJS sessions always cancelled the heartbeat
task first prior to sending messages. However when the heartbeat task
is already in progress, cancellation of it is not enough and we must
wait until the heartbeat is sent.
This commit adds a heartbeat ... | spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/SockJsSessionTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -287,11 +287,12 @@ public void scheduleAndCa... | true |
Other | spring-projects | spring-framework | 9656015d269d812928ac6c4ea6c45d16534b656e.json | Fix typo in javadoc
See gh-1080 | spring-context/src/main/java/org/springframework/cache/interceptor/CacheOperation.java | @@ -115,7 +115,7 @@ public int hashCode() {
/**
* Return an identifying description for this cache operation.
* <p>Returned value is produced by calling {@link Builder#getOperationDescription()}
- * during object construction. This method is used in {#hashCode} and {#equals}.
+ * during object construction. T... | true |
Other | spring-projects | spring-framework | 9656015d269d812928ac6c4ea6c45d16534b656e.json | Fix typo in javadoc
See gh-1080 | spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointManager.java | @@ -214,7 +214,7 @@ public ActivationSpec getActivationSpec() {
* Set whether to auto-start the endpoint activation after this endpoint
* manager has been initialized and the context has been refreshed.
* <p>Default is "true". Turn this flag off to defer the endpoint
- * activation until an explicit {#start()... | true |
Other | spring-projects | spring-framework | 53909a5333c33a24ff231c194e18b7cef49a42c7.json | Polish key abstractions section for the TCF | src/asciidoc/testing.adoc | @@ -1226,8 +1226,8 @@ one to write so-called __POJO test classes__. POJO test classes are not required
extend a particular class hierarchy.
The following section provides an overview of the internals of the TestContext
-framework. If you are only interested in using the framework and not necessarily
-interested in ... | false |
Other | spring-projects | spring-framework | 4fd80bbb67d24d1ff26d8fe1583a5dda5e4c178f.json | Add Jackons decoder tests related List vs Flux | spring-web-reactive/src/test/java/org/springframework/core/codec/support/JacksonJsonDecoderTests.java | @@ -16,6 +16,11 @@
package org.springframework.core.codec.support;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Ignore;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.test.TestSubscriber;
@@ -29,27 +34,86 @@
import stati... | false |
Other | spring-projects | spring-framework | 22a6ca1f412856f8a83494f83fee2c7ca3e48a9e.json | Remove Pojo from tests that shouldn't depend on it
The Pojo test class from the codec package will end up in spring-core.
This commit ensures it is used only from classes that also belong to
spring-core. | spring-web-reactive/src/test/java/org/springframework/web/reactive/config/WebReactiveConfigurationTests.java | @@ -21,6 +21,8 @@
import java.util.List;
import java.util.concurrent.CompletableFuture;
+import javax.xml.bind.annotation.XmlRootElement;
+
import org.junit.Before;
import org.junit.Test;
import reactor.core.publisher.Flux;
@@ -36,7 +38,6 @@
import org.springframework.core.codec.support.JacksonJsonEncoder;
imp... | true |
Other | spring-projects | spring-framework | 22a6ca1f412856f8a83494f83fee2c7ca3e48a9e.json | Remove Pojo from tests that shouldn't depend on it
The Pojo test class from the codec package will end up in spring-core.
This commit ensures it is used only from classes that also belong to
spring-core. | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyArgumentResolverTests.java | @@ -28,6 +28,8 @@
import java.util.Set;
import java.util.concurrent.CompletableFuture;
+import javax.xml.bind.annotation.XmlRootElement;
+
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@@ -44,7 +46,6 @@
import org.springframework.core.codec.Decoder;
import org.springframework.core.co... | true |
Other | spring-projects | spring-framework | 22a6ca1f412856f8a83494f83fee2c7ca3e48a9e.json | Remove Pojo from tests that shouldn't depend on it
The Pojo test class from the codec package will end up in spring-core.
This commit ensures it is used only from classes that also belong to
spring-core. | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/view/HttpMessageConverterViewTests.java | @@ -23,6 +23,7 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -33,7 +34,6 @@
import org.springframework.core.ResolvableType;
import org.springframework.core.codec.support.JacksonJsonEncoder;
... | true |
Other | spring-projects | spring-framework | 36765f0f525a206922215793790aef7027257900.json | Add protected method to reactive config | spring-web-reactive/src/main/java/org/springframework/web/reactive/config/WebReactiveConfiguration.java | @@ -91,6 +91,10 @@ public void setApplicationContext(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
+ protected ApplicationContext getApplicationContext() {
+ return this.applicationContext;
+ }
+
@Bean
public RequestMappingHandlerMapping requestMappingHandlerMapp... | false |
Other | spring-projects | spring-framework | 7ec85b21bbf536292e1e1bffd82d41d10a45277e.json | Remove unused test class | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/AbstractRequestAttributesArgumentResolverTests.java | @@ -1,177 +0,0 @@
-/*
- * Copyright 2002-2016 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 | 9352e3d047e27a91149e471bac7584ff17fa6b92.json | Add ClientRequest attribute for URI template
Issue: SPR-16537 | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java | @@ -65,6 +65,8 @@
*/
class DefaultWebClient implements WebClient {
+ private static final String URI_TEMPLATE_ATTRIBUTE = WebClient.class.getName() + ".uriTemplate";
+
private static final Mono<ClientResponse> NO_HTTP_CLIENT_RESPONSE_ERROR = Mono.error(
new IllegalStateException("The underlying HTTP client c... | false |
Other | spring-projects | spring-framework | 83300c4b277be594ce4fc78c5142b0c085e79263.json | Polish: follow naming convention | spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java | @@ -89,7 +89,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
new AnnotationTypeFilter(Embeddable.class, false),
new AnnotationTypeFilter(MappedSuperclass.class, false)};
- private final TypeFilter CONVERTER_TYPE_FILTER = new AnnotationTypeFilter(Converter.class, false);
+ private static f... | true |
Other | spring-projects | spring-framework | 83300c4b277be594ce4fc78c5142b0c085e79263.json | Polish: follow naming convention | spring-webflux/src/main/java/org/springframework/web/reactive/result/condition/ProducesRequestCondition.java | @@ -50,7 +50,7 @@ public final class ProducesRequestCondition extends AbstractRequestCondition<Pro
private final static ProducesRequestCondition PRE_FLIGHT_MATCH = new ProducesRequestCondition();
- private final List<ProduceMediaTypeExpression> MEDIA_TYPE_ALL_LIST =
+ private final List<ProduceMediaTypeExpression... | true |
Other | spring-projects | spring-framework | 83300c4b277be594ce4fc78c5142b0c085e79263.json | Polish: follow naming convention | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/ProducesRequestCondition.java | @@ -53,7 +53,7 @@ public final class ProducesRequestCondition extends AbstractRequestCondition<Pro
private static final ProducesRequestCondition EMPTY_CONDITION = new ProducesRequestCondition();
- private final List<ProduceMediaTypeExpression> MEDIA_TYPE_ALL_LIST =
+ private static final List<ProduceMediaTypeExpr... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-beans/src/main/java/org/springframework/beans/AbstractNestablePropertyAccessor.java | @@ -695,11 +695,7 @@ else if (value instanceof Map) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Index of out of bounds in property path '" + propertyName + "'", ex);
}
- catch (NumberFormatException ex) {
- throw new InvalidPropertyException(getRootClass(), this... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java | @@ -504,11 +504,8 @@ protected Object createBean(String beanName, RootBeanDefinition mbd, @Nullable O
}
return beanInstance;
}
- catch (BeanCreationException ex) {
+ catch (BeanCreationException | ImplicitlyAppearedSingletonException ex) {
// A previously detected exception with proper bean creation co... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-beans/src/main/java/org/springframework/beans/propertyeditors/PathEditor.java | @@ -85,10 +85,8 @@ public void setAsText(String text) throws IllegalArgumentException {
return;
}
}
- catch (URISyntaxException ex) {
+ catch (URISyntaxException | FileSystemNotFoundException ex) {
// Not a valid URI: Let's try as Spring resource location.
- }
- catch (FileSystemNotFoundExce... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java | @@ -365,10 +365,7 @@ public Object invoke(MethodInvocation invocation) throws Throwable {
try {
return doInvoke(invocation);
}
- catch (MBeanConnectFailureException ex) {
- return handleConnectFailure(invocation, ex);
- }
- catch (IOException ex) {
+ catch (MBeanConnectFailureException | IOException ex)... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java | @@ -673,18 +673,10 @@ protected void doExecuteListener(Session session, Message message) throws JMSExc
try {
invokeListener(session, message);
}
- catch (JMSException ex) {
+ catch (JMSException | RuntimeException | Error ex) {
rollbackOnExceptionIfNecessary(session, ex);
throw ex;
}
- catch (Ru... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-jms/src/main/java/org/springframework/jms/support/JmsUtils.java | @@ -217,10 +217,7 @@ public static void commitIfNecessary(Session session) throws JMSException {
try {
session.commit();
}
- catch (javax.jms.TransactionInProgressException ex) {
- // Ignore -> can only happen in case of a JTA transaction.
- }
- catch (javax.jms.IllegalStateException ex) {
+ catch (java... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java | @@ -847,12 +847,7 @@ protected void doBegin(Object transaction, TransactionDefinition definition) {
try {
doJtaBegin(txObject, definition);
}
- catch (NotSupportedException ex) {
- // assume nested transaction not supported
- throw new NestedTransactionNotSupportedException(
- "JTA implementation doe... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java | @@ -175,11 +175,8 @@ public void transferTo(File dest) throws IOException, IllegalStateException {
catch (FileUploadException ex) {
throw new IllegalStateException(ex.getMessage(), ex);
}
- catch (IllegalStateException ex) {
+ catch (IllegalStateException | IOException ex) {
// Pass through when coming ... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-webflux/src/main/java/org/springframework/web/reactive/result/condition/AbstractMediaTypeExpression.java | @@ -74,10 +74,7 @@ public final boolean match(ServerWebExchange exchange) {
boolean match = matchMediaType(exchange);
return (!this.isNegated == match);
}
- catch (NotAcceptableStatusException ex) {
- return false;
- }
- catch (UnsupportedMediaTypeStatusException ex) {
+ catch (NotAcceptableStatusExcep... | true |
Other | spring-projects | spring-framework | 7bce04c06ccfcbcec1c4f7a3dbc75cea6621505a.json | Polish: combine catches block with same body | spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java | @@ -499,11 +499,7 @@ protected final void initServletBean() throws ServletException {
this.webApplicationContext = initWebApplicationContext();
initFrameworkServlet();
}
- catch (ServletException ex) {
- this.logger.error("Context initialization failed", ex);
- throw ex;
- }
- catch (RuntimeException ... | true |
Other | spring-projects | spring-framework | e12fcca1e3e4d3e8c676dcf3cee94311a4161cbe.json | Fix failing test | spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/ResponseEntityTests.java | @@ -111,7 +111,7 @@ public void entityStream() {
.accept(TEXT_EVENT_STREAM)
.exchange()
.expectStatus().isOk()
- .expectHeader().contentType(TEXT_EVENT_STREAM)
+ .expectHeader().contentTypeCompatibleWith(TEXT_EVENT_STREAM)
.returnResult(Person.class);
StepVerifier.create(result.getRespons... | false |
Other | spring-projects | spring-framework | c6f5acf15d261f82ba888a6c4ffc525c4fc1ca70.json | Upgrade Dokka to 0.9.16 | build.gradle | @@ -15,7 +15,7 @@ plugins {
id "com.gradle.build-scan" version "1.8"
id "io.spring.dependency-management" version "1.0.3.RELEASE" apply false
id "org.jetbrains.kotlin.jvm" version "1.2.21" apply false
- id "org.jetbrains.dokka" version "0.9.15"
+ id "org.jetbrains.dokka" version "0.9.16"
id "org.asciidoctor.con... | false |
Other | spring-projects | spring-framework | d3eff49c59d10c8d50f243071c082034ddf234b3.json | Fix typos in webmvc documentation | src/docs/asciidoc/web/webmvc.adoc | @@ -151,12 +151,12 @@ Below is example configuration with a `WebApplicationContext` hierarchy:
@Override
protected Class<?>[] getRootConfigClasses() {
- return new Class<?[] { RootConfig.class };
+ return new Class<?>[] { RootConfig.class };
}
@Override
protected Class<?>[] getServletConfigClasse... | false |
Other | spring-projects | spring-framework | b9892cc5d4a0d1658873b150a7c1014531ffbea4.json | Add missing overrides to MockServerHttpResponse | spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpResponse.java | @@ -18,6 +18,7 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
+import java.util.function.Function;
import java.util.function.Supplier;
import org.reactivestreams.Publisher;
@@ -56,6 +57,8 @@ public class MockServerHttpResponse implements ServerHttpResponse {
private DataBuffer... | false |
Other | spring-projects | spring-framework | 3df902c6cc62770d5ef49f18fac8a3f6e35e7526.json | Add ServerHttpRequest builder
Similar pattern as for ServerWebExchange with a default mutate method
on ServerHttpRequest returning a Builder and eventually creating an
immutable wrapper.
HttpHandlerAdapterSupport uses the builder to set the contextPath. | spring-web/src/main/java/org/springframework/http/server/reactive/DefaultServerHttpRequestBuilder.java | @@ -0,0 +1,181 @@
+/*
+ * Copyright 2002-2016 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 | 3df902c6cc62770d5ef49f18fac8a3f6e35e7526.json | Add ServerHttpRequest builder
Similar pattern as for ServerWebExchange with a default mutate method
on ServerHttpRequest returning a Builder and eventually creating an
immutable wrapper.
HttpHandlerAdapterSupport uses the builder to set the contextPath. | spring-web/src/main/java/org/springframework/http/server/reactive/HttpHandlerAdapterSupport.java | @@ -111,9 +111,11 @@ public Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response)
.filter(entry -> path.startsWith(entry.getKey()))
.findFirst()
.map(entry -> {
+ // Preserve "native" contextPath from underlying request..
+ String contextPath = request.getContextPath() + ... | true |
Other | spring-projects | spring-framework | 3df902c6cc62770d5ef49f18fac8a3f6e35e7526.json | Add ServerHttpRequest builder
Similar pattern as for ServerWebExchange with a default mutate method
on ServerHttpRequest returning a Builder and eventually creating an
immutable wrapper.
HttpHandlerAdapterSupport uses the builder to set the contextPath. | spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpRequest.java | @@ -16,7 +16,14 @@
package org.springframework.http.server.reactive;
+import java.net.URI;
+
+import reactor.core.publisher.Flux;
+
+import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.http.HttpCookie;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.Http... | true |
Other | spring-projects | spring-framework | 3df902c6cc62770d5ef49f18fac8a3f6e35e7526.json | Add ServerHttpRequest builder
Similar pattern as for ServerWebExchange with a default mutate method
on ServerHttpRequest returning a Builder and eventually creating an
immutable wrapper.
HttpHandlerAdapterSupport uses the builder to set the contextPath. | spring-web/src/test/java/org/springframework/http/server/reactive/HttpHandlerAdapterSupportTests.java | @@ -16,6 +16,8 @@
package org.springframework.http.server.reactive;
import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -48,7 +50,7 @@ public void invalidContextPath() throws Exception {
private void testInvalidContextPa... | true |
Other | spring-projects | spring-framework | 2191d80a31507e1c6b30ad57c49d7998625c7487.json | Allow athentication at the STOMP level
This commit makes it possible for a ChannelInterceptor to override the
user header in a Spring Message that contains a STOMP CONNECT frame.
After the message is sent, the updated user header is observed and
saved to be associated with session thereafter.
Issue: SPR-14690 | spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java | @@ -101,6 +101,8 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
private MessageHeaderInitializer headerInitializer;
+ private final Map<String, Principal> stompAuthentications = new ConcurrentHashMap<String, Principal>();
+
private Boolean immutableMessageInterceptorPresent;... | true |
Other | spring-projects | spring-framework | 2191d80a31507e1c6b30ad57c49d7998625c7487.json | Allow athentication at the STOMP level
This commit makes it possible for a ChannelInterceptor to override the
user header in a Spring Message that contains a STOMP CONNECT frame.
After the message is sent, the updated user header is observed and
saved to be associated with session thereafter.
Issue: SPR-14690 | spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java | @@ -17,6 +17,7 @@
package org.springframework.web.socket.messaging;
import java.io.IOException;
+import java.security.Principal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -34,6 +35,8 @@
import org.springframework.context.PayloadApplicationEvent;
import org.springfram... | true |
Other | spring-projects | spring-framework | 2191d80a31507e1c6b30ad57c49d7998625c7487.json | Allow athentication at the STOMP level
This commit makes it possible for a ChannelInterceptor to override the
user header in a Spring Message that contains a STOMP CONNECT frame.
After the message is sent, the updated user header is observed and
saved to be associated with session thereafter.
Issue: SPR-14690 | src/asciidoc/web-websocket.adoc | @@ -1647,35 +1647,127 @@ If the application prefix is set to "/app" then the foo method is effectively ma
[[websocket-stomp-authentication]]
=== Authentication
-In a WebSocket-style application it is often useful to know who sent a message.
-Therefore some form of authentication is needed to establish the user iden... | true |
Other | spring-projects | spring-framework | ba47d06cbb6a07bdc57042da9dd59daafe5c5aae.json | Update integration tests for reactor-netty
Now that reactor/reactor-netty#12 is fixed, we can restore the
previously ignored integration tests.
New tests are hanging, so this commit is converting the `StepVerifier`
`verify()` calls to using actual timeouts.
Issue: SPR-14975 | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java | @@ -52,7 +52,6 @@
import org.springframework.http.ResponseEntity;
import org.springframework.http.codec.json.Jackson2JsonEncoder;
import org.springframework.http.server.reactive.ZeroCopyIntegrationTests;
-import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer;
import org.springframework.web.bin... | true |
Other | spring-projects | spring-framework | ba47d06cbb6a07bdc57042da9dd59daafe5c5aae.json | Update integration tests for reactor-netty
Now that reactor/reactor-netty#12 is fixed, we can restore the
previously ignored integration tests.
New tests are hanging, so this commit is converting the `StepVerifier`
`verify()` calls to using actual timeouts.
Issue: SPR-14975 | spring-web/src/test/java/org/springframework/http/server/reactive/FlushingIntegrationTests.java | @@ -73,7 +73,7 @@ public void writeAndAutoFlushOnComplete() {
StepVerifier.create(result)
.consumeNextWith(value -> Assert.isTrue(value.length() == 200000))
.expectComplete()
- .verify();
+ .verify(Duration.ofSeconds(5L));
}
@Override | true |
Other | spring-projects | spring-framework | ba47d06cbb6a07bdc57042da9dd59daafe5c5aae.json | Update integration tests for reactor-netty
Now that reactor/reactor-netty#12 is fixed, we can restore the
previously ignored integration tests.
New tests are hanging, so this commit is converting the `StepVerifier`
`verify()` calls to using actual timeouts.
Issue: SPR-14975 | spring-web/src/test/java/org/springframework/http/server/reactive/ZeroCopyIntegrationTests.java | @@ -19,7 +19,6 @@
import java.io.File;
import java.net.URI;
-import org.junit.Assume;
import org.junit.Test;
import reactor.core.publisher.Mono;
@@ -35,7 +34,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
import stat... | true |
Other | spring-projects | spring-framework | ba47d06cbb6a07bdc57042da9dd59daafe5c5aae.json | Update integration tests for reactor-netty
Now that reactor/reactor-netty#12 is fixed, we can restore the
previously ignored integration tests.
New tests are hanging, so this commit is converting the `StepVerifier`
`verify()` calls to using actual timeouts.
Issue: SPR-14975 | spring-web/src/test/java/org/springframework/web/client/reactive/WebClientIntegrationTests.java | @@ -77,7 +77,7 @@ public void headers() throws Exception {
assertEquals(13L, httpHeaders.getContentLength());
})
.expectComplete()
- .verify();
+ .verify(Duration.ofSeconds(3));
RecordedRequest recordedRequest = server.takeRequest();
assertEquals(1, server.getRequestCount());
@@ -101,7... | true |
Other | spring-projects | spring-framework | 2802926c1dae64c1ec067effb4d22c616e1183ba.json | update STOMP support to reactor-netty 0.6 | spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyTcpConnection.java | @@ -61,11 +61,11 @@ public ReactorNettyTcpConnection(NettyInbound inbound, NettyOutbound outbound,
@Override
public ListenableFuture<Void> send(Message<P> message) {
- ByteBuf byteBuf = this.inbound.alloc()
- .buffer();
+ ByteBuf byteBuf = this.outbound.alloc()
+ ... | false |
Other | spring-projects | spring-framework | 70bab23609a63903dde7112983a324748c371146.json | update STOMP support to reactor-netty 0.6 | spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyTcpConnection.java | @@ -61,9 +61,11 @@ public ReactorNettyTcpConnection(NettyInbound inbound, NettyOutbound outbound,
@Override
public ListenableFuture<Void> send(Message<P> message) {
- ByteBuf byteBuf = this.inbound.channel().alloc().buffer();
+ ByteBuf byteBuf = this.inbound.alloc()
+ .buffer();
... | false |
Other | spring-projects | spring-framework | 52f664139f65bc8573e70f8c770c4784f9163f23.json | Improve VersionResourceResolve javadoc
The `pathPatterns` args are relative to the patterns configured for the
resource handler.
Issue: SPR-14817 | spring-web-reactive/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java | @@ -96,7 +96,8 @@ public Map<String, VersionStrategy> getStrategyMap() {
* default strategy to use except when it cannot be, for example when using
* JavaScript module loaders, use {@link #addFixedVersionStrategy} instead
* for serving JavaScript files.
- * @param pathPatterns one or more resource URL path pa... | true |
Other | spring-projects | spring-framework | 52f664139f65bc8573e70f8c770c4784f9163f23.json | Improve VersionResourceResolve javadoc
The `pathPatterns` args are relative to the patterns configured for the
resource handler.
Issue: SPR-14817 | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java | @@ -94,7 +94,8 @@ public Map<String, VersionStrategy> getStrategyMap() {
* default strategy to use except when it cannot be, for example when using
* JavaScript module loaders, use {@link #addFixedVersionStrategy} instead
* for serving JavaScript files.
- * @param pathPatterns one or more resource URL path pa... | true |
Other | spring-projects | spring-framework | 17089d607feb28c5f7689ecdf2eb0a145430f3a9.json | Allow RedirectAttributes on ExceptionHandlers
Prior to this commit, `@ExceptionHandler` methods could not be injected
with `RedirectAttributes` arguments. This would make it impossible to
handle an error by redirecting to another view and add flashmap
attributes, to be included in the model when the next view is calle... | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java | @@ -55,6 +55,8 @@
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.handler.AbstractHandlerMethodExceptionResolver;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+import org.springframework.web.servlet.su... | true |
Other | spring-projects | spring-framework | 17089d607feb28c5f7689ecdf2eb0a145430f3a9.json | Allow RedirectAttributes on ExceptionHandlers
Prior to this commit, `@ExceptionHandler` methods could not be injected
with `RedirectAttributes` arguments. This would make it impossible to
handle an error by redirecting to another view and add flashmap
attributes, to be included in the model when the next view is calle... | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RedirectAttributesMethodArgumentResolver.java | @@ -53,8 +53,14 @@ public boolean supportsParameter(MethodParameter parameter) {
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception {
- DataBinder dataBinder = binderFactory.createBinder(... | true |
Other | spring-projects | spring-framework | 17089d607feb28c5f7689ecdf2eb0a145430f3a9.json | Allow RedirectAttributes on ExceptionHandlers
Prior to this commit, `@ExceptionHandler` methods could not be injected
with `RedirectAttributes` arguments. This would make it impossible to
handle an error by redirecting to another view and add flashmap
attributes, to be included in the model when the next view is calle... | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolverTests.java | @@ -42,7 +42,10 @@
import org.springframework.web.method.annotation.ModelMethodProcessor;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
+import org.springframework.web.servlet.DispatcherServlet;
+import org.... | true |
Other | spring-projects | spring-framework | 123ee5f2dab22f1148272a9e1a852cd474b233a5.json | Add WebClient create() and build() static methods | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientBuilder.java | @@ -48,6 +48,10 @@ class DefaultWebClientBuilder implements WebClient.Builder {
private MultiValueMap<String, String> defaultCookies;
+ public DefaultWebClientBuilder() {
+ this(new DefaultUriBuilderFactory());
+ }
+
public DefaultWebClientBuilder(String baseUrl) {
this(new DefaultUriBuilderFactory(baseUrl)... | true |
Other | spring-projects | spring-framework | 123ee5f2dab22f1148272a9e1a852cd474b233a5.json | Add WebClient create() and build() static methods | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java | @@ -117,6 +117,16 @@ public interface WebClient {
// Static, factory methods
+ /**
+ * Shortcut for:
+ * <pre class="code">
+ * WebClient client = builder().build();
+ * </pre>
+ */
+ static WebClient create() {
+ return new DefaultWebClientBuilder().build();
+ }
+
/**
* Shortcut for:
* <pre class="... | true |
Other | spring-projects | spring-framework | 99deb387ed1328f0fbdc603b17cbd69dccf01228.json | Add Kotlin WebClient extensions | spring-web-reactive/src/main/kotlin/org/springframework/web/reactive/function/client/WebClientExtensions.kt | @@ -0,0 +1,13 @@
+package org.springframework.web.reactive.function.client
+
+import org.reactivestreams.Publisher
+
+/**
+ * Extension for [WebClient.HeaderSpec.exchange] providing a variant without explicit class
+ * parameter thanks to Kotlin reified type parameters.
+ *
+ * @author Sebastien Deleuze
+ * @since 5.0
... | false |
Other | spring-projects | spring-framework | 1fb0b0b78609e5d201d90062149697e68722612a.json | Expose remoteAddress from ServerHttpRequest
Issue: SPR-15200 | spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java | @@ -15,12 +15,14 @@
*/
package org.springframework.mock.http.server.reactive;
+import java.net.InetSocketAddress;
import java.net.URI;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.List;
+import java.util.Optio... | true |
Other | spring-projects | spring-framework | 1fb0b0b78609e5d201d90062149697e68722612a.json | Expose remoteAddress from ServerHttpRequest
Issue: SPR-15200 | spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpRequest.java | @@ -19,6 +19,7 @@
import java.net.InetSocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.Optional;
import io.netty.handler.codec.http.cookie.Cookie;
import reactor.core.publisher.Flux;
@@ -57,7 +58,8 @@ public ReactorServerHttpRequest(HttpServerRequest request, NettyDataBuf... | true |
Other | spring-projects | spring-framework | 1fb0b0b78609e5d201d90062149697e68722612a.json | Expose remoteAddress from ServerHttpRequest
Issue: SPR-15200 | spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyHttpHandlerAdapter.java | @@ -16,10 +16,13 @@
package org.springframework.http.server.reactive;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
import java.util.Map;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
+import io.netty.channel.Channel;
import io.netty.handler.codec.http.HttpRes... | true |
Other | spring-projects | spring-framework | 1fb0b0b78609e5d201d90062149697e68722612a.json | Expose remoteAddress from ServerHttpRequest
Issue: SPR-15200 | spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpRequest.java | @@ -19,6 +19,7 @@
import java.net.InetSocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.Optional;
import io.netty.buffer.ByteBuf;
import io.netty.handler.codec.http.cookie.Cookie;
@@ -35,7 +36,6 @@
import org.springframework.util.Assert;
import org.springframework.util.L... | true |
Other | spring-projects | spring-framework | 1fb0b0b78609e5d201d90062149697e68722612a.json | Expose remoteAddress from ServerHttpRequest
Issue: SPR-15200 | spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpRequest.java | @@ -16,6 +16,9 @@
package org.springframework.http.server.reactive;
+import java.net.InetSocketAddress;
+import java.util.Optional;
+
import org.springframework.http.HttpCookie;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpRequest;
@@ -53,6 +56,12 @@ default String getContextP... | true |
Other | spring-projects | spring-framework | 1fb0b0b78609e5d201d90062149697e68722612a.json | Expose remoteAddress from ServerHttpRequest
Issue: SPR-15200 | spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpRequestDecorator.java | @@ -15,7 +15,9 @@
*/
package org.springframework.http.server.reactive;
+import java.net.InetSocketAddress;
import java.net.URI;
+import java.util.Optional;
import reactor.core.publisher.Flux;
@@ -76,6 +78,11 @@ public MultiValueMap<String, HttpCookie> getCookies() {
return getDelegate().getCookies();
}
... | true |
Other | spring-projects | spring-framework | 1fb0b0b78609e5d201d90062149697e68722612a.json | Expose remoteAddress from ServerHttpRequest
Issue: SPR-15200 | spring-web/src/main/java/org/springframework/http/server/reactive/ServletServerHttpRequest.java | @@ -17,11 +17,13 @@
package org.springframework.http.server.reactive;
import java.io.IOException;
+import java.net.InetSocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import java.util.Enumeration;
import java.util.Map;
+import java.util.Optional;
import... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.