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 | 6a7b197af7f52568e14d53fab86a0aa44319f2ae.json | Improve Jackson codecs documentation | src/docs/asciidoc/core/core-databuffer-codec.adoc | @@ -160,7 +160,7 @@ Note that a decoder instance needs to consider <<databuffer-reference-counting,
Spring comes with a wide array of default codecs, capable of converting from/to `String`,
`ByteBuffer`, byte arrays, and also codecs that support marshalling libraries such as JAXB and
-Jackson.
+Jackson (with https:... | true |
Other | spring-projects | spring-framework | f05175586e32e660ff190311f0b102c2b3b3a398.json | Refine behavior on error after response committed
If the response is set and we can't change the status through
ServerHttpResponse any more, allow the error signal to propagate and
let the individual server adapters handle it. Ultimately that should
result in closing the connection.
On Servlet containers, we check on... | spring-web/src/main/java/org/springframework/http/server/reactive/ReactorHttpHandlerAdapter.java | @@ -72,12 +72,8 @@ public Mono<Void> apply(HttpServerRequest request, HttpServerResponse response)
}
return this.httpHandler.handle(adaptedRequest, adaptedResponse)
- .onErrorResume(ex -> {
- logger.error("Could not complete request", ex);
- response.status(HttpResponseStatus.INTERNAL_SERVER_ERROR);
... | true |
Other | spring-projects | spring-framework | f05175586e32e660ff190311f0b102c2b3b3a398.json | Refine behavior on error after response committed
If the response is set and we can't change the status through
ServerHttpResponse any more, allow the error signal to propagate and
let the individual server adapters handle it. Ultimately that should
result in closing the connection.
On Servlet containers, we check on... | spring-web/src/main/java/org/springframework/http/server/reactive/ServletHttpHandlerAdapter.java | @@ -18,11 +18,14 @@
import java.io.IOException;
import java.util.Collection;
+import java.util.concurrent.atomic.AtomicBoolean;
import javax.servlet.AsyncContext;
import javax.servlet.AsyncEvent;
import javax.servlet.AsyncListener;
+import javax.servlet.DispatcherType;
import javax.servlet.Servlet;
import java... | true |
Other | spring-projects | spring-framework | f05175586e32e660ff190311f0b102c2b3b3a398.json | Refine behavior on error after response committed
If the response is set and we can't change the status through
ServerHttpResponse any more, allow the error signal to propagate and
let the individual server adapters handle it. Ultimately that should
result in closing the connection.
On Servlet containers, we check on... | spring-web/src/main/java/org/springframework/http/server/reactive/UndertowHttpHandlerAdapter.java | @@ -16,6 +16,8 @@
package org.springframework.http.server.reactive;
+import java.io.IOException;
+
import io.undertow.server.HttpServerExchange;
import org.apache.commons.logging.Log;
@@ -98,16 +100,26 @@ public void onNext(Void aVoid) {
@Override
public void onError(Throwable ex) {
- logger.error("C... | true |
Other | spring-projects | spring-framework | f05175586e32e660ff190311f0b102c2b3b3a398.json | Refine behavior on error after response committed
If the response is set and we can't change the status through
ServerHttpResponse any more, allow the error signal to propagate and
let the individual server adapters handle it. Ultimately that should
result in closing the connection.
On Servlet containers, we check on... | spring-web/src/main/java/org/springframework/web/server/adapter/HttpWebHandlerAdapter.java | @@ -157,10 +157,7 @@ public LocaleContextResolver getLocaleContextResolver() {
public Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response) {
ServerWebExchange exchange = createExchange(request, response);
return getDelegate().handle(exchange)
- .onErrorResume(ex -> {
- handleFailure(... | true |
Other | spring-projects | spring-framework | f05175586e32e660ff190311f0b102c2b3b3a398.json | Refine behavior on error after response committed
If the response is set and we can't change the status through
ServerHttpResponse any more, allow the error signal to propagate and
let the individual server adapters handle it. Ultimately that should
result in closing the connection.
On Servlet containers, we check on... | spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingExceptionHandlingIntegrationTests.java | @@ -18,8 +18,10 @@
import java.io.IOException;
+import org.junit.Assume;
import org.junit.Test;
import org.reactivestreams.Publisher;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import org.springframework.context.ApplicationContext;
@@ -28,6 +30,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | f05175586e32e660ff190311f0b102c2b3b3a398.json | Refine behavior on error after response committed
If the response is set and we can't change the status through
ServerHttpResponse any more, allow the error signal to propagate and
let the individual server adapters handle it. Ultimately that should
result in closing the connection.
On Servlet containers, we check on... | spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java | @@ -23,7 +23,6 @@
import java.util.LinkedHashMap;
import java.util.Map;
-import org.apache.tomcat.websocket.WsWebSocketContainer;
import org.apache.tomcat.websocket.server.WsContextListener;
import org.junit.After;
import org.junit.Before; | true |
Other | spring-projects | spring-framework | 260ebeca3ada9d0bd2d62c41256cafe81ac8ca03.json | Improve performance of some string operations
Issue: SPR-16293 | spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java | @@ -341,10 +341,10 @@ Class<?> getBeanClass() {
PropertyDescriptor getPropertyDescriptor(String name) {
PropertyDescriptor pd = this.propertyDescriptorCache.get(name);
if (pd == null && StringUtils.hasLength(name)) {
- // Same lenient fallback checking as in PropertyTypeDescriptor...
- pd = this.propertyDes... | true |
Other | spring-projects | spring-framework | 260ebeca3ada9d0bd2d62c41256cafe81ac8ca03.json | Improve performance of some string operations
Issue: SPR-16293 | spring-core/src/main/java/org/springframework/core/convert/Property.java | @@ -239,11 +239,9 @@ private Field getField() {
field = ReflectionUtils.findField(declaringClass, name);
if (field == null) {
// Same lenient fallback checking as in CachedIntrospectionResults...
- field = ReflectionUtils.findField(declaringClass,
- name.substring(0, 1).toLowerCase() + name.substri... | true |
Other | spring-projects | spring-framework | 260ebeca3ada9d0bd2d62c41256cafe81ac8ca03.json | Improve performance of some string operations
Issue: SPR-16293 | spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java | @@ -427,7 +427,7 @@ protected void addClassPathManifestEntries(Set<Resource> result) {
int prefixIndex = filePath.indexOf(':');
if (prefixIndex == 1) {
// Possibly "c:" drive prefix on Windows, to be upper-cased for proper duplicate detection
- filePath = filePath.substring(0, 1).toUpperCase() +... | true |
Other | spring-projects | spring-framework | 260ebeca3ada9d0bd2d62c41256cafe81ac8ca03.json | Improve performance of some string operations
Issue: SPR-16293 | spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java | @@ -469,24 +469,24 @@ public static String convertUnderscoreNameToPropertyName(@Nullable String name)
StringBuilder result = new StringBuilder();
boolean nextIsUpper = false;
if (name != null && name.length() > 0) {
- if (name.length() > 1 && name.substring(1, 2).equals("_")) {
- result.append(name.substr... | true |
Other | spring-projects | spring-framework | 260ebeca3ada9d0bd2d62c41256cafe81ac8ca03.json | Improve performance of some string operations
Issue: SPR-16293 | spring-web/src/main/java/org/springframework/web/multipart/support/StandardServletMultipartResolver.java | @@ -21,6 +21,7 @@
import org.apache.commons.logging.LogFactory;
+import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartException;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.MultipartResolver;
@@ -67,11 +... | true |
Other | spring-projects | spring-framework | ac00d8a215d054f3a2dcaaaab09d999fa053416c.json | Use JCenter first to resolve plugins
This is a workaround for Kotlin/dokka#146. | settings.gradle | @@ -9,6 +9,14 @@ pluginManagement {
}
*/
+// Workaround for https://github.com/Kotlin/dokka/issues/146
+pluginManagement {
+ repositories {
+ jcenter()
+ gradlePluginPortal()
+ }
+}
+
include "spring-aop"
include "spring-aspects"
include "spring-beans" | false |
Other | spring-projects | spring-framework | 769ea1b106d957d02d7d0f004b5f4d2b44fc8c06.json | Fix Kdoc regression to show only Kotlin API
As of Gradle Kotlin plugin 1.1.60,
project.sourceSets.main.kotlin.srcDirs contains
Java source directories in addition to Kotlin
ones. This commit filter out Java sources to
retain only Kotlin ones.
Issue: SPR-16268 | gradle/docs.gradle | @@ -66,7 +66,8 @@ dokka {
outputDirectory = "$buildDir/docs/kdoc"
sourceDirs = files(subprojects.collect { project ->
- project.sourceSets.main.kotlin.srcDirs
+ def kotlinDirs = project.sourceSets.main.kotlin.srcDirs.collect()
+ kotlinDirs -= project.sourceSets.main.java.srcDirs
})
externalDocumentationLin... | false |
Other | spring-projects | spring-framework | 591429e538d1e59b47dff4c760cfd8763c57ebd7.json | Fix exception message
initialDelayString is parsed into long, not integer.
Closes gh-1615 | spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java | @@ -365,7 +365,7 @@ protected void processScheduled(Scheduled scheduled, Method method, Object bean)
}
catch (NumberFormatException ex) {
throw new IllegalArgumentException(
- "Invalid initialDelayString value \"" + initialDelayString + "\" - cannot parse into integer");
+ "Invalid init... | false |
Other | spring-projects | spring-framework | 767ea9db8370945a364b94d770b81d05d0209aef.json | Fix minor logic error in SocketUtils | spring-core/src/main/java/org/springframework/util/SocketUtils.java | @@ -258,12 +258,13 @@ int findAvailablePort(int minPort, int maxPort) {
int candidatePort;
int searchCounter = 0;
do {
- if (searchCounter++ > portRange) {
+ if (searchCounter > portRange) {
throw new IllegalStateException(String.format(
"Could not find an available %s port in the range ... | true |
Other | spring-projects | spring-framework | 767ea9db8370945a364b94d770b81d05d0209aef.json | Fix minor logic error in SocketUtils | spring-core/src/test/java/org/springframework/util/SocketUtilsTests.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.
@@ -22,10 +22,14 @@
import java.util.SortedSet... | true |
Other | spring-projects | spring-framework | 04ab93ceb451882c6e75127897e2f1c5ec33772d.json | Add missing verb on the note about relays | src/docs/asciidoc/web/websocket.adoc | @@ -1383,7 +1383,7 @@ it acts as a "relay" that forwards messages in both directions.
[NOTE]
====
-Please `org.projectreactor:reactor-net` and `io.netty:netty-all`
+Please add `org.projectreactor:reactor-net` and `io.netty:netty-all`
dependencies to your project for TCP connection management.
====
| false |
Other | spring-projects | spring-framework | 203370a810fad77d33c3484dbf9e79242583bf5b.json | Handle absolute URI in Reactor request.uri()
The request URI returned from HttpServerRequest.uri() typically
contains contains an absolute path but could also contain an
absolute URI. This commit adds handling for the latter, effectively
taking only the absolute path portion.
Issue: SPR-16243 | spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpRequest.java | @@ -36,6 +36,7 @@
import org.springframework.util.Assert;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
+import org.springframework.util.StringUtils;
/**
* Adapt {@link ServerHttpRequest} to the Reactor {@link HttpServerRequest}.
@@ -62,7 +63,7 @@ public Rea... | false |
Other | spring-projects | spring-framework | dd0d270ba26e163d41fd2b06e1ea13afe1ca6aac.json | Improve error handling when response is committed
ResponseStatusExceptionHandler lets the error through if it can't
change the status while HttpWebHandlerAdapter logs a more helpful
message (including status code) but without a full stack trace.
Issue: SPR-16231 | spring-web/src/main/java/org/springframework/web/server/adapter/HttpWebHandlerAdapter.java | @@ -71,7 +71,7 @@ public class HttpWebHandlerAdapter extends WebHandlerDecorator implements HttpHa
* <p>TODO:
* This definition is currently duplicated between HttpWebHandlerAdapter
* and AbstractSockJsSession. It is a candidate for a common utility class.
- * @see #indicatesDisconnectedClient(Throwable)
+ *... | true |
Other | spring-projects | spring-framework | dd0d270ba26e163d41fd2b06e1ea13afe1ca6aac.json | Improve error handling when response is committed
ResponseStatusExceptionHandler lets the error through if it can't
change the status while HttpWebHandlerAdapter logs a more helpful
message (including status code) but without a full stack trace.
Issue: SPR-16231 | spring-web/src/main/java/org/springframework/web/server/handler/ResponseStatusExceptionHandler.java | @@ -20,6 +20,7 @@
import org.apache.commons.logging.LogFactory;
import reactor.core.publisher.Mono;
+import org.springframework.http.HttpStatus;
import org.springframework.web.server.ResponseStatusException;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebExcepti... | true |
Other | spring-projects | spring-framework | dd0d270ba26e163d41fd2b06e1ea13afe1ca6aac.json | Improve error handling when response is committed
ResponseStatusExceptionHandler lets the error through if it can't
change the status while HttpWebHandlerAdapter logs a more helpful
message (including status code) but without a full stack trace.
Issue: SPR-16231 | spring-web/src/test/java/org/springframework/web/server/handler/ResponseStatusExceptionHandlerTests.java | @@ -59,10 +59,9 @@ public void unresolvedException() throws Exception {
public void responseCommitted() throws Exception {
Throwable ex = new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Oops");
this.exchange.getResponse().setStatusCode(HttpStatus.CREATED);
- this.exchange.getResponse().setComple... | true |
Other | spring-projects | spring-framework | 804935a8ebbe969a3d6f73412678ac3f4c7c0929.json | try less log and increase timeout | spring-web-reactive/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java | @@ -63,7 +63,7 @@ public void writeAndFlushWith() throws Exception {
StepVerifier.create(result)
.expectNext("data0data1")
.expectComplete()
- .verify(Duration.ofSeconds(5L));
+ .verify(Duration.ofSeconds(10L));
}
@Test // SPR-14991
@@ -77,7 +77,7 @@ public void writeAndAutoFlushOnComplete() {... | true |
Other | spring-projects | spring-framework | 804935a8ebbe969a3d6f73412678ac3f4c7c0929.json | try less log and increase timeout | spring-web-reactive/src/test/resources/log4j2-test.xml | @@ -8,7 +8,7 @@
<Loggers>
<Logger name="org.springframework.http" level="debug" />
<Logger name="org.springframework.web" level="debug" />
- <Logger name="reactor" level="debug" />
+ <Logger name="reactor" level="info" />
<Root level="error">
<AppenderRef ref="Console" />
</Root> | true |
Other | spring-projects | spring-framework | 5fd600d2adeb0c0b4cdab5d3a1ec55ce6a10e849.json | Fix failing test | spring-web-reactive/src/test/java/org/springframework/web/reactive/socket/server/WebSocketIntegrationTests.java | @@ -29,6 +29,7 @@
import org.springframework.web.reactive.HandlerMapping;
import org.springframework.web.reactive.handler.SimpleUrlHandlerMapping;
import org.springframework.web.reactive.socket.WebSocketHandler;
+import org.springframework.web.reactive.socket.WebSocketMessage;
import org.springframework.web.reactiv... | false |
Other | spring-projects | spring-framework | 7bde85ae555c5ac315d60c963a1517367e9a99b5.json | Fix previous commit | spring-web/src/test/java/org/springframework/http/server/reactive/AbstractHttpHandlerIntegrationTests.java | @@ -46,8 +46,8 @@ public static Object[][] arguments() {
File base = new File(System.getProperty("java.io.tmpdir"));
return new Object[][] {
{new JettyHttpServer()},
- //{new RxNettyHttpServer()},
- {new ReactorHttpServer()},
+ {new RxNettyHttpServer()},
+ //{new ReactorHttpServer()},
{new T... | false |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/HandshakeInfo.java | @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.web.reactive.socket.adapter;
+package org.springframework.web.reactive.socket;
import java.net.URI;
import java.security.Principal; | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/WebSocketMessage.java | @@ -88,20 +88,21 @@ public String getPayloadAsText() {
* </pre>
* @see DataBufferUtils#retain(DataBuffer)
*/
- public void retainPayload() {
+ public WebSocketMessage retain() {
DataBufferUtils.retain(this.payload);
+ return this;
}
/**
- * Release the data buffer for the message payload, which is u... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/WebSocketSession.java | @@ -15,9 +15,6 @@
*/
package org.springframework.web.reactive.socket;
-import java.net.URI;
-import java.security.Principal;
-import java.util.Optional;
import java.util.function.Function;
import org.reactivestreams.Publisher;
@@ -26,8 +23,6 @@
import org.springframework.core.io.buffer.DataBuffer;
import o... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/AbstractListenerWebSocketSession.java | @@ -27,6 +27,7 @@
import org.springframework.http.server.reactive.AbstractListenerReadPublisher;
import org.springframework.http.server.reactive.AbstractListenerWriteProcessor;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.sprin... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/JettyWebSocketHandlerAdapter.java | @@ -34,6 +34,7 @@
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketHand... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/JettyWebSocketSession.java | @@ -27,6 +27,7 @@
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.util.ObjectUtils;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketMessage;
imp... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/NettyWebSocketSessionSupport.java | @@ -31,6 +31,7 @@
import org.springframework.core.io.buffer.NettyDataBuffer;
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.util.ObjectUtils;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketMessage;
... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/ReactorNettyWebSocketSession.java | @@ -25,6 +25,7 @@
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketMessage;
import org.springframework.web.reactive.so... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/RxNettyWebSocketSession.java | @@ -26,6 +26,7 @@
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketMessage;
import org.springframework.web.reactive.so... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/TomcatWebSocketHandlerAdapter.java | @@ -30,6 +30,7 @@
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketHand... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/TomcatWebSocketSession.java | @@ -29,6 +29,7 @@
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketMessage;
import org.springframework.web.reactive.socket.... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/UndertowWebSocketHandlerAdapter.java | @@ -32,6 +32,7 @@
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketHand... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/UndertowWebSocketSession.java | @@ -29,6 +29,7 @@
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.util.ObjectUtils;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketMessage;
imp... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/WebSocketHandlerAdapterSupport.java | @@ -17,6 +17,7 @@
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.util.Assert;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketHandler;
/** | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/adapter/WebSocketSessionSupport.java | @@ -29,6 +29,7 @@
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.util.Assert;
import org.springframework.web.reactive.socket.CloseStatus;
+import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketMessage;
import o... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/client/RxNettyWebSocketClient.java | @@ -35,7 +35,7 @@
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.web.reactive.socket.WebSocketSession;
-import org.springframework.web.reactive.socket.adapter.HandshakeInfo;
+import org.springframework.web.reactive.socket.Hand... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/server/upgrade/JettyRequestUpgradeStrategy.java | @@ -37,7 +37,7 @@
import org.springframework.http.server.reactive.ServletServerHttpResponse;
import org.springframework.util.Assert;
import org.springframework.web.reactive.socket.WebSocketHandler;
-import org.springframework.web.reactive.socket.adapter.HandshakeInfo;
+import org.springframework.web.reactive.socket.... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/server/upgrade/ReactorNettyRequestUpgradeStrategy.java | @@ -27,7 +27,7 @@
import org.springframework.http.server.reactive.ReactorServerHttpResponse;
import org.springframework.util.StringUtils;
import org.springframework.web.reactive.socket.WebSocketHandler;
-import org.springframework.web.reactive.socket.adapter.HandshakeInfo;
+import org.springframework.web.reactive.so... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/server/upgrade/RxNettyRequestUpgradeStrategy.java | @@ -29,7 +29,7 @@
import org.springframework.http.server.reactive.RxNettyServerHttpResponse;
import org.springframework.web.reactive.socket.WebSocketHandler;
import org.springframework.web.reactive.socket.WebSocketSession;
-import org.springframework.web.reactive.socket.adapter.HandshakeInfo;
+import org.springframe... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/server/upgrade/TomcatRequestUpgradeStrategy.java | @@ -38,7 +38,7 @@
import org.springframework.http.server.reactive.ServletServerHttpResponse;
import org.springframework.util.Assert;
import org.springframework.web.reactive.socket.WebSocketHandler;
-import org.springframework.web.reactive.socket.adapter.HandshakeInfo;
+import org.springframework.web.reactive.socket.... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/main/java/org/springframework/web/reactive/socket/server/upgrade/UndertowRequestUpgradeStrategy.java | @@ -26,7 +26,7 @@
import org.springframework.http.server.reactive.UndertowServerHttpRequest;
import org.springframework.util.Assert;
import org.springframework.web.reactive.socket.WebSocketHandler;
-import org.springframework.web.reactive.socket.adapter.HandshakeInfo;
+import org.springframework.web.reactive.socket.... | true |
Other | spring-projects | spring-framework | 558d7f3f3efa4bdc03e252474bec46f62c2acb72.json | Fix package cycle
HandshakeInfo has been promoted to the top-level socket package next to
WebSocketSession which exposes it. | spring-web-reactive/src/test/java/org/springframework/web/reactive/socket/server/WebSocketIntegrationTests.java | @@ -25,7 +25,6 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.web.reactive.HandlerMapping;
import org.springframework.web.reactive.handler.SimpleUrlHandlerMap... | true |
Other | spring-projects | spring-framework | 9376748c9c17902f650709af4fc1c572ce63f04a.json | Apply getAcceptLanguageAsLocale and encodeUrl
Apply the new HttpHeaders#getAcceptLanguageAsLocale() in places where
it was hardcoded or defaulting.
Apply ServerHttpResponse.encodeUrl in RequestContext.
Issue: SPR-15024 | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/DefaultServerResponseBuilder.java | @@ -317,7 +317,8 @@ public Mono<Void> writeTo(ServerWebExchange exchange, HandlerStrategies strategi
ServerHttpResponse response = exchange.getResponse();
writeStatusAndHeaders(response);
MediaType contentType = exchange.getResponse().getHeaders().getContentType();
- Locale locale = Locale.ENGLISH; // TOD... | true |
Other | spring-projects | spring-framework | 9376748c9c17902f650709af4fc1c572ce63f04a.json | Apply getAcceptLanguageAsLocale and encodeUrl
Apply the new HttpHeaders#getAcceptLanguageAsLocale() in places where
it was hardcoded or defaulting.
Apply ServerHttpResponse.encodeUrl in RequestContext.
Issue: SPR-15024 | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/view/RequestContext.java | @@ -76,7 +76,9 @@ public RequestContext(ServerWebExchange exchange, Map<String, Object> model,
this.model = model;
this.messageSource = messageSource;
this.defaultHtmlEscape = null; // TODO
- this.locale = Locale.getDefault(); // TODO
+
+ Locale acceptLocale = exchange.getRequest().getHeaders().getAcceptLang... | true |
Other | spring-projects | spring-framework | 9376748c9c17902f650709af4fc1c572ce63f04a.json | Apply getAcceptLanguageAsLocale and encodeUrl
Apply the new HttpHeaders#getAcceptLanguageAsLocale() in places where
it was hardcoded or defaulting.
Apply ServerHttpResponse.encodeUrl in RequestContext.
Issue: SPR-15024 | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandler.java | @@ -212,7 +212,9 @@ public Mono<Void> handleResult(ServerWebExchange exchange, HandlerResult result)
Mono<List<View>> viewsMono;
Model model = result.getModel();
- Locale locale = Locale.getDefault(); // TODO
+
+ Locale acceptLocale = exchange.getRequest().getHeaders().getAcceptLanguageAsLocale();... | true |
Other | spring-projects | spring-framework | 9376748c9c17902f650709af4fc1c572ce63f04a.json | Apply getAcceptLanguageAsLocale and encodeUrl
Apply the new HttpHeaders#getAcceptLanguageAsLocale() in places where
it was hardcoded or defaulting.
Apply ServerHttpResponse.encodeUrl in RequestContext.
Issue: SPR-15024 | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerView.java | @@ -170,7 +170,10 @@ protected Mono<Void> renderInternal(Map<String, Object> renderAttributes, MediaT
if (logger.isDebugEnabled()) {
logger.debug("Rendering FreeMarker template [" + getUrl() + "].");
}
- Locale locale = Locale.getDefault(); // TODO
+
+ Locale acceptLocale = exchange.getRequest().getHeaders(... | true |
Other | spring-projects | spring-framework | db2ebd30da027498273ed7a4ea6714d07adef6fd.json | Add Support for ForwardedHeaderFilter sendRedirect
Previously ForwrdedHeaderFilter did not ensure that
HttpServletResponse.sendRedirect worked properly based on
X-Forwarded-* headers.
This commit updates ForwardedHeaderFilter to overrided the
HttpServletResponse.sendRedirect method to ensure
X-Forwarded-* headers are... | spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java | @@ -23,11 +23,13 @@
import java.util.Locale;
import java.util.Map;
import java.util.Set;
+
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
+i... | true |
Other | spring-projects | spring-framework | db2ebd30da027498273ed7a4ea6714d07adef6fd.json | Add Support for ForwardedHeaderFilter sendRedirect
Previously ForwrdedHeaderFilter did not ensure that
HttpServletResponse.sendRedirect worked properly based on
X-Forwarded-* headers.
This commit updates ForwardedHeaderFilter to overrided the
HttpServletResponse.sendRedirect method to ensure
X-Forwarded-* headers are... | spring-web/src/test/java/org/springframework/web/filter/ForwardedHeaderFilterTests.java | @@ -17,9 +17,13 @@
import java.io.IOException;
import java.util.Enumeration;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRespons... | true |
Other | spring-projects | spring-framework | 36da299f96e7be182ea956f3094d0cf1715da6c5.json | Add set/getContentLanguage() to HttpHeaders
Issue: SPR-14536 | spring-web/src/main/java/org/springframework/http/HttpHeaders.java | @@ -762,6 +762,32 @@ public ContentDisposition getContentDisposition() {
return ContentDisposition.empty();
}
+ /**
+ * Set the {@link Locale} of the content language,
+ * as specified by the {@literal Content-Language} header.
+ * <p>Use {@code set(CONTENT_LANGUAGE, ...)} if you need
+ * to set multiple con... | true |
Other | spring-projects | spring-framework | 36da299f96e7be182ea956f3094d0cf1715da6c5.json | Add set/getContentLanguage() to HttpHeaders
Issue: SPR-14536 | spring-web/src/test/java/org/springframework/http/HttpHeadersTests.java | @@ -439,4 +439,15 @@ public void acceptLanguage() {
assertArrayEquals(languageArray, languages.toArray());
}
+ @Test
+ public void contentLanguage() {
+ assertNull(headers.getContentLanguage());
+ headers.setContentLanguage(Locale.FRANCE);
+ assertEquals(Locale.FRANCE, headers.getContentLanguage());
+ assert... | true |
Other | spring-projects | spring-framework | 9764d5743384fea77e0894090b6e56418ae82457.json | Add set/getAcceptLanguage() to HttpHeaders
Issue: SPR-15024 | spring-web/src/main/java/org/springframework/http/HttpHeaders.java | @@ -20,6 +20,8 @@
import java.net.InetSocketAddress;
import java.net.URI;
import java.nio.charset.Charset;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -37,6 +39,7 @@
import java.util.Ti... | true |
Other | spring-projects | spring-framework | 9764d5743384fea77e0894090b6e56418ae82457.json | Add set/getAcceptLanguage() to HttpHeaders
Issue: SPR-15024 | spring-web/src/test/java/org/springframework/http/HttpHeadersTests.java | @@ -422,4 +422,21 @@ public void accessControlRequestMethod() {
assertEquals(HttpMethod.POST, headers.getAccessControlRequestMethod());
}
+ @Test
+ public void acceptLanguage() {
+ assertTrue(headers.getAcceptLanguage().isEmpty());
+ String headerValue = "fr-ch, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5";
+ heade... | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | build.gradle | @@ -858,6 +858,7 @@ project("spring-web-reactive") {
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
testCompile("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
+ testCompile("com.squareup.okhttp3:mockwebserver:${okhttp3Version}"... | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientRequest.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.net.URI;
import java.nio.charset.Charset; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.util.List;
import java.util.Optional; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilder.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.net.URI;
import java.nio.charset.Charset; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientResponse.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.util.Collections;
import java.util.List; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientBuilder.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.util.logging.Level;
| true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientStrategiesBuilder.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.util.ArrayList;
import java.util.Collections; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.util.function.Function;
| true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctions.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.nio.charset.StandardCharsets;
import java.util.Base64; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ExchangeFunction.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import reactor.core.publisher.Mono;
| true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/WebClient.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import reactor.core.publisher.Mono;
| true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/WebClientException.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import org.springframework.core.NestedRuntimeException;
| true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/WebClientStrategies.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.util.function.Supplier;
import java.util.stream.Stream; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/package-info.java | @@ -0,0 +1,22 @@
+/*
+ * 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 | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.http.server.reactive;
+package org.springframework.web.reactive;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
@@ -30,9 +30,13 @@
import org.springframework.core.io.buffer.DataBufferFactory;
import org.... | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilderTests.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.net.URI;
import java.nio.ByteBuffer; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientResponseTests.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctionsTests.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import org.junit.Test;
import reactor.core.publisher.Mono; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.time.Duration;
@@ -24,6 +24,7 @@
import okhttp3.mockwebserver.RecordedRequest;
import org.hamcrest.Matchers;
import org.junit.After... | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/WebClientStrategiesTests.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.web.client.reactive;
+package org.springframework.web.reactive.function.client;
import java.util.Collections;
import java.util.List; | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java | @@ -22,6 +22,7 @@
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
+import reactor.test.StepVerifier;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
@@ -32,13 +33,12 @@
import org... | true |
Other | spring-projects | spring-framework | aa8f5315265b83895effd7038ac7f4772ed6a6f1.json | Move WebClient to web.reactive.function.client | spring-web/src/main/java/org/springframework/web/client/reactive/package-info.java | @@ -1,6 +0,0 @@
-/**
- * Provides a reactive {@link org.springframework.web.client.reactive.WebClient}
- * that builds on top of the
- * {@code org.springframework.http.client.reactive} reactive HTTP adapter layer.
- */
-package org.springframework.web.client.reactive; | true |
Other | spring-projects | spring-framework | 8d786e8bba86de45d486c0dd858522ca4190f0d1.json | Refactor the usage of Undertow ByteBufferPool
- lazy allocate the PooledByteBuffer, only if there is a request body
for reading
- close the PooledByteBuffer once the request finishes | spring-web/src/main/java/org/springframework/http/server/reactive/AbstractListenerReadPublisher.java | @@ -78,7 +78,7 @@ public final void onDataAvailable() {
* @see ReadListener#onAllDataRead()
* @see org.xnio.ChannelListener#handleEvent(Channel)
*/
- public final void onAllDataRead() {
+ public void onAllDataRead() {
if (this.logger.isTraceEnabled()) {
this.logger.trace(this.state + " onAllDataRead");
... | true |
Other | spring-projects | spring-framework | 8d786e8bba86de45d486c0dd858522ca4190f0d1.json | Refactor the usage of Undertow ByteBufferPool
- lazy allocate the PooledByteBuffer, only if there is a request body
for reading
- close the PooledByteBuffer once the request finishes | spring-web/src/main/java/org/springframework/http/server/reactive/UndertowHttpHandlerAdapter.java | @@ -58,7 +58,7 @@ public void setDataBufferFactory(DataBufferFactory dataBufferFactory) {
@Override
public void handleRequest(HttpServerExchange exchange) throws Exception {
- ServerHttpRequest request = new UndertowServerHttpRequest(exchange, this.dataBufferFactory);
+ UndertowServerHttpRequest request = new U... | true |
Other | spring-projects | spring-framework | 8d786e8bba86de45d486c0dd858522ca4190f0d1.json | Refactor the usage of Undertow ByteBufferPool
- lazy allocate the PooledByteBuffer, only if there is a request body
for reading
- close the PooledByteBuffer once the request finishes | spring-web/src/main/java/org/springframework/http/server/reactive/UndertowServerHttpRequest.java | @@ -21,6 +21,7 @@
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
+import io.undertow.connector.ByteBufferPool;
import io.undertow.connector.PooledByteBuffer;
import io.undertow.server.HttpServerExchange;
import io.undertow.server.handlers.Cookie;
@@ -106,6 +107,10 @@ public Flux<DataBuffer> getB... | true |
Other | spring-projects | spring-framework | 4021d239ab15dfd119d248c9e830ed2f2f935985.json | Fix JsonObjectDecoder with '[' starting chunk
Issue: SPR-15013 | spring-web/src/main/java/org/springframework/http/codec/json/JsonObjectDecoder.java | @@ -212,9 +212,6 @@ else if (Character.isWhitespace(c)) {
}
}
- if (this.input.readableBytes() == 0) {
- this.index = 0;
- }
return Flux.fromIterable(chunks);
}
| true |
Other | spring-projects | spring-framework | 4021d239ab15dfd119d248c9e830ed2f2f935985.json | Fix JsonObjectDecoder with '[' starting chunk
Issue: SPR-15013 | spring-web/src/test/java/org/springframework/http/codec/json/JsonObjectDecoderTests.java | @@ -106,6 +106,19 @@ public void decodeMultipleChunksToArray() throws InterruptedException {
.expectNext("{\"foo\": \"baz\"}")
.expectComplete()
.verify();
+
+ // SPR-15013
+ source = Flux.just(stringBuffer("["), stringBuffer("{\"id\":1,\"name\":\"Robert\"}"),
+ stringBuffer(","), stringBuffer("{\... | true |
Other | spring-projects | spring-framework | 73b44828e9dba23fec73286829c4583e6342049a.json | Resolve async model attributes in AbstractView
This change allows the functional WebFlux API to support natively
reactive types and also makes it possible for View implementations to
disable async attributes resolution if they want for example take
advantage of stream rendering.
It also makes AbstractView#getModelAtt... | spring-webflux/src/main/java/org/springframework/web/reactive/result/view/AbstractView.java | @@ -18,13 +18,13 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+i... | true |
Other | spring-projects | spring-framework | 73b44828e9dba23fec73286829c4583e6342049a.json | Resolve async model attributes in AbstractView
This change allows the functional WebFlux API to support natively
reactive types and also makes it possible for View implementations to
disable async attributes resolution if they want for example take
advantage of stream rendering.
It also makes AbstractView#getModelAtt... | spring-webflux/src/main/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandler.java | @@ -224,10 +224,9 @@ else if (CharSequence.class.isAssignableFrom(clazz) && !hasModelAnnotation(param
viewsMono = resolveViews(getDefaultViewName(exchange), locale);
}
- return resolveAsyncAttributes(model.asMap())
- .doOnSuccess(aVoid -> addBindingResult(result.getBindingContext(), exchange))
... | true |
Other | spring-projects | spring-framework | 73b44828e9dba23fec73286829c4583e6342049a.json | Resolve async model attributes in AbstractView
This change allows the functional WebFlux API to support natively
reactive types and also makes it possible for View implementations to
disable async attributes resolution if they want for example take
advantage of stream rendering.
It also makes AbstractView#getModelAtt... | spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java | @@ -0,0 +1,77 @@
+package org.springframework.web.reactive.result.view;
+
+import io.reactivex.Observable;
+import io.reactivex.Single;
+import org.junit.Before;
+import org.junit.Test;
+import org.springframework.http.MediaType;
+import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest;
+import ... | true |
Other | spring-projects | spring-framework | 73b44828e9dba23fec73286829c4583e6342049a.json | Resolve async model attributes in AbstractView
This change allows the functional WebFlux API to support natively
reactive types and also makes it possible for View implementations to
disable async attributes resolution if they want for example take
advantage of stream rendering.
It also makes AbstractView#getModelAtt... | spring-webflux/src/test/java/org/springframework/web/reactive/result/view/RedirectViewTests.java | @@ -61,7 +61,7 @@ public void noUrlSet() throws Exception {
public void defaultStatusCode() {
String url = "http://url.somewhere.com";
RedirectView view = new RedirectView(url);
- view.render(new HashMap<>(), MediaType.TEXT_HTML, this.exchange);
+ view.render(new HashMap<>(), MediaType.TEXT_HTML, this.exchang... | true |
Other | spring-projects | spring-framework | 73b44828e9dba23fec73286829c4583e6342049a.json | Resolve async model attributes in AbstractView
This change allows the functional WebFlux API to support natively
reactive types and also makes it possible for View implementations to
disable async attributes resolution if they want for example take
advantage of stream rendering.
It also makes AbstractView#getModelAtt... | spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java | @@ -32,7 +32,6 @@
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
import rx.Completable;
-import rx.Observable;
import rx.Single;
import org.springframework.core.MethodParameter;
@@ -249,34 +248,6 @@ public void contentNegotiationWith406() throws Exception {
.verify();
}
- @Test
- ... | true |
Other | spring-projects | spring-framework | 840d7abbf633745e8a7e17fe08ff356cac170e03.json | Add ResponseSpec to WebClient
Replace the overloaded "retrieve" methods with a single retrieve() +
ResponseSpec exposing shortcut methods (bodyToMono, bodyToFlux)
mirroring the ClientResponse shortcuts it delegates to.
Unlike exchange() however with retrieve() there is no access to other
parts of ClientResponse so Re... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java | @@ -27,7 +27,6 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseCookie;
-import org.springframework.http.ResponseEntity;
import org.springframework.http.client.reactive.ClientHttpResponse;
import org.springframework.util.MultiValueMap... | true |
Other | spring-projects | spring-framework | 840d7abbf633745e8a7e17fe08ff356cac170e03.json | Add ResponseSpec to WebClient
Replace the overloaded "retrieve" methods with a single retrieve() +
ResponseSpec exposing shortcut methods (bodyToMono, bodyToFlux)
mirroring the ClientResponse shortcuts it delegates to.
Unlike exchange() however with retrieve() there is no access to other
parts of ClientResponse so Re... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultClientResponse.java | @@ -33,7 +33,6 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseCookie;
-import org.springframework.http.ResponseEntity;
import org.springframework.http.client.reactive.ClientHttpResponse;
import org.springframework.http.codec.HttpMes... | true |
Other | spring-projects | spring-framework | 840d7abbf633745e8a7e17fe08ff356cac170e03.json | Add ResponseSpec to WebClient
Replace the overloaded "retrieve" methods with a single retrieve() +
ResponseSpec exposing shortcut methods (bodyToMono, bodyToFlux)
mirroring the ClientResponse shortcuts it delegates to.
Unlike exchange() however with retrieve() there is no access to other
parts of ClientResponse so Re... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java | @@ -22,6 +22,7 @@
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
+import java.util.List;
import java.util.Map;
import java.util.function.Function;
@@ -32,12 +33,11 @@
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
i... | true |
Other | spring-projects | spring-framework | 840d7abbf633745e8a7e17fe08ff356cac170e03.json | Add ResponseSpec to WebClient
Replace the overloaded "retrieve" methods with a single retrieve() +
ResponseSpec exposing shortcut methods (bodyToMono, bodyToFlux)
mirroring the ClientResponse shortcuts it delegates to.
Unlike exchange() however with retrieve() there is no access to other
parts of ClientResponse so Re... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java | @@ -19,6 +19,7 @@
import java.net.URI;
import java.nio.charset.Charset;
import java.time.ZonedDateTime;
+import java.util.List;
import java.util.Map;
import java.util.function.Function;
@@ -29,11 +30,10 @@
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.spri... | true |
Other | spring-projects | spring-framework | 840d7abbf633745e8a7e17fe08ff356cac170e03.json | Add ResponseSpec to WebClient
Replace the overloaded "retrieve" methods with a single retrieve() +
ResponseSpec exposing shortcut methods (bodyToMono, bodyToFlux)
mirroring the ClientResponse shortcuts it delegates to.
Unlike exchange() however with retrieve() there is no access to other
parts of ClientResponse so Re... | spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java | @@ -17,6 +17,8 @@
package org.springframework.web.reactive.function.client;
import java.time.Duration;
+import java.util.Arrays;
+import java.util.List;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
@@ -33,6 +35,7 @@
import org.springframework.http.HttpHeaders;
import ... | true |
Other | spring-projects | spring-framework | e6b4edc757b9470db5238155a958622b1d005baa.json | Simplify access to response body in WebClient
This commit makes a change to WebClient in oder to facilitate getting
the response body as a `Mono<Object>` or `Flux<Object>` without having
to deal with `ClientResponse`.
Specifically, this commit:
- Adds `RequestHeaderSpec.retrieve` methods, next to `exchange`, that
... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java | @@ -27,6 +27,7 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseCookie;
+import org.springframework.http.ResponseEntity;
import org.springframework.http.client.reactive.ClientHttpResponse;
import org.springframework.util.MultiValueMap... | true |
Other | spring-projects | spring-framework | e6b4edc757b9470db5238155a958622b1d005baa.json | Simplify access to response body in WebClient
This commit makes a change to WebClient in oder to facilitate getting
the response body as a `Mono<Object>` or `Flux<Object>` without having
to deal with `ClientResponse`.
Specifically, this commit:
- Adds `RequestHeaderSpec.retrieve` methods, next to `exchange`, that
... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultClientResponse.java | @@ -33,6 +33,7 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseCookie;
+import org.springframework.http.ResponseEntity;
import org.springframework.http.client.reactive.ClientHttpResponse;
import org.springframework.http.codec.HttpMes... | true |
Other | spring-projects | spring-framework | e6b4edc757b9470db5238155a958622b1d005baa.json | Simplify access to response body in WebClient
This commit makes a change to WebClient in oder to facilitate getting
the response body as a `Mono<Object>` or `Flux<Object>` without having
to deal with `ClientResponse`.
Specifically, this commit:
- Adds `RequestHeaderSpec.retrieve` methods, next to `exchange`, that
... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java | @@ -26,15 +26,18 @@
import java.util.function.Function;
import org.reactivestreams.Publisher;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org... | true |
Other | spring-projects | spring-framework | e6b4edc757b9470db5238155a958622b1d005baa.json | Simplify access to response body in WebClient
This commit makes a change to WebClient in oder to facilitate getting
the response body as a `Mono<Object>` or `Flux<Object>` without having
to deal with `ClientResponse`.
Specifically, this commit:
- Adds `RequestHeaderSpec.retrieve` methods, next to `exchange`, that
... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java | @@ -23,14 +23,17 @@
import java.util.function.Function;
import org.reactivestreams.Publisher;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org... | true |
Other | spring-projects | spring-framework | e6b4edc757b9470db5238155a958622b1d005baa.json | Simplify access to response body in WebClient
This commit makes a change to WebClient in oder to facilitate getting
the response body as a `Mono<Object>` or `Flux<Object>` without having
to deal with `ClientResponse`.
Specifically, this commit:
- Adds `RequestHeaderSpec.retrieve` methods, next to `exchange`, that
... | spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java | @@ -133,6 +133,50 @@ public void jsonString() throws Exception {
Assert.assertEquals("application/json", recordedRequest.getHeader(HttpHeaders.ACCEPT));
}
+ @Test
+ public void jsonStringRetrieveMono() throws Exception {
+ String content = "{\"bar\":\"barbar\",\"foo\":\"foofoo\"}";
+ this.server.enqueue(new Mo... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.