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 | 6aa6d91ea98b16c38ac3c5c10e61c0be30b7b686.json | Remove deprecated constructors in WebSocket config
In preparation for SPR-16189. | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java | @@ -20,10 +20,10 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import org.springframework.lang.Nullable;
import org.springframework.scheduling.TaskScheduler;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springf... | true |
Other | spring-projects | spring-framework | 6aa6d91ea98b16c38ac3c5c10e61c0be30b7b686.json | Remove deprecated constructors in WebSocket config
In preparation for SPR-16189. | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/SockJsServiceRegistration.java | @@ -83,18 +83,6 @@ public class SockJsServiceRegistration {
public SockJsServiceRegistration() {
}
- /**
- * Deprecated constructor with a TaskScheduler.
- * @deprecated as of 5.0 a TaskScheduler is not provided upfront, not until
- * it is obvious that it is needed; call {@link #getTaskScheduler()} to check
-... | true |
Other | spring-projects | spring-framework | 4d0800f3924fa8a7fc4a9b411974760b9e4e1305.json | Improve ContentCachingRequestWrapper performance
This commit improves the performance of `read` method variants
to write to the cache in an optimized way.
Issue: SPR-15762 | spring-web/src/main/java/org/springframework/web/util/ContentCachingRequestWrapper.java | @@ -213,6 +213,57 @@ public ContentCachingInputStream(ServletInputStream is) {
this.is = is;
}
+ @Override
+ public int readLine(final byte[] b, final int off, final int len) throws IOException {
+ int count = is.readLine(b, off, len);
+ cache(b, off, count);
+ return count;
+ }
+
+ private void cach... | false |
Other | spring-projects | spring-framework | 2ac6a15f6f559042dcf26d687b2297c6d0d6f985.json | Add setBearerAuth method
Issue: SPR-16997 | spring-web/src/main/java/org/springframework/http/HttpHeaders.java | @@ -747,7 +747,20 @@ public void setBasicAuth(String username, String password, @Nullable Charset cha
String credentialsString = username + ":" + password;
byte[] encodedBytes = Base64.getEncoder().encode(credentialsString.getBytes(charset));
String encodedCredentials = new String(encodedBytes, charset);
- se... | true |
Other | spring-projects | spring-framework | 2ac6a15f6f559042dcf26d687b2297c6d0d6f985.json | Add setBearerAuth method
Issue: SPR-16997 | spring-web/src/test/java/org/springframework/http/HttpHeadersTests.java | @@ -549,4 +549,13 @@ public void basicAuthIllegalChar() {
headers.setBasicAuth(username, password);
}
+ @Test
+ public void bearerAuth() {
+ String token = "foo";
+
+ headers.setBearerAuth(token);
+ String authorization = headers.getFirst(HttpHeaders.AUTHORIZATION);
+ assertEquals("Bearer foo", authorization... | true |
Other | spring-projects | spring-framework | 6d6aa72e8f0a2c542a083391a5001e388facb215.json | improve performance of projection instantiation | spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java | @@ -22,7 +22,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -94,7 +93,7 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
* ... | true |
Other | spring-projects | spring-framework | 6d6aa72e8f0a2c542a083391a5001e388facb215.json | improve performance of projection instantiation | spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java | @@ -653,7 +653,7 @@ private Reference<K, V> findInChain(Reference<K, V> ref, @Nullable Object key, i
@SuppressWarnings("unchecked")
private Reference<K, V>[] createReferenceArray(int size) {
- return (Reference<K, V>[]) Array.newInstance(Reference.class, size);
+ return new Reference[size];
}
privat... | true |
Other | spring-projects | spring-framework | 7746878b5044790a09d926522318d1c1cced397c.json | Remove workaround for Reactor Netty #171 | spring-web/src/main/java/org/springframework/http/server/reactive/HttpHeadResponseDecorator.java | @@ -33,6 +33,7 @@
*/
public class HttpHeadResponseDecorator extends ServerHttpResponseDecorator {
+
public HttpHeadResponseDecorator(ServerHttpResponse delegate) {
super(delegate);
}
@@ -45,16 +46,14 @@ public HttpHeadResponseDecorator(ServerHttpResponse delegate) {
*/
@Override
public final Mono<Voi... | true |
Other | spring-projects | spring-framework | 7746878b5044790a09d926522318d1c1cced397c.json | Remove workaround for Reactor Netty #171 | spring-web/src/main/java/org/springframework/http/server/reactive/ReactorHttpHandlerAdapter.java | @@ -52,31 +52,29 @@ public ReactorHttpHandlerAdapter(HttpHandler httpHandler) {
@Override
- public Mono<Void> apply(HttpServerRequest request, HttpServerResponse response) {
- NettyDataBufferFactory bufferFactory = new NettyDataBufferFactory(response.alloc());
- ServerHttpRequest adaptedRequest;
- ServerHttpRe... | true |
Other | spring-projects | spring-framework | bc3cf0eeb8b96a75a7a8a6351665975ed8b5081d.json | Expose request id at the ServerHttpRequest level
Hiding it (at AbstractServerHttpRequest) complicates matters since
requests are often mutated and decorated, plus it's also possible to
implement the interface directly (we've one, albeit corner case).
Issue: SPR-16966 | spring-web/src/main/java/org/springframework/http/server/reactive/AbstractServerHttpRequest.java | @@ -64,7 +64,7 @@ public abstract class AbstractServerHttpRequest implements ServerHttpRequest {
private SslInfo sslInfo;
@Nullable
- private String connectionId;
+ private String id;
@Nullable
private String logPrefix;
@@ -83,6 +83,26 @@ public AbstractServerHttpRequest(URI uri, @Nullable String contextPat... | true |
Other | spring-projects | spring-framework | bc3cf0eeb8b96a75a7a8a6351665975ed8b5081d.json | Expose request id at the ServerHttpRequest level
Hiding it (at AbstractServerHttpRequest) complicates matters since
requests are often mutated and decorated, plus it's also possible to
implement the interface directly (we've one, albeit corner case).
Issue: SPR-16966 | spring-web/src/main/java/org/springframework/http/server/reactive/DefaultServerHttpRequestBuilder.java | @@ -32,7 +32,6 @@
import org.springframework.util.Assert;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
-import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
/**
@@ -192,8 +191,6 @@ private static class MutatedServerHttpRe... | true |
Other | spring-projects | spring-framework | bc3cf0eeb8b96a75a7a8a6351665975ed8b5081d.json | Expose request id at the ServerHttpRequest level
Hiding it (at AbstractServerHttpRequest) complicates matters since
requests are often mutated and decorated, plus it's also possible to
implement the interface directly (we've one, albeit corner case).
Issue: SPR-16966 | spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpRequest.java | @@ -176,7 +176,7 @@ public <T> T getNativeRequest() {
@Override
@Nullable
- protected String initConnectionId() {
+ protected String initId() {
return this.request instanceof Connection ?
((Connection) this.request).channel().id().asShortText() : null;
} | true |
Other | spring-projects | spring-framework | bc3cf0eeb8b96a75a7a8a6351665975ed8b5081d.json | Expose request id at the ServerHttpRequest level
Hiding it (at AbstractServerHttpRequest) complicates matters since
requests are often mutated and decorated, plus it's also possible to
implement the interface directly (we've one, albeit corner case).
Issue: SPR-16966 | spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpRequest.java | @@ -38,6 +38,14 @@
*/
public interface ServerHttpRequest extends HttpRequest, ReactiveHttpInputMessage {
+ /**
+ * Return an id that represents the underlying connection, if available, or
+ * the request, for the purpose of correlating log messages.
+ * @since 5.1
+ * @see org.springframework.web.server.Server... | true |
Other | spring-projects | spring-framework | bc3cf0eeb8b96a75a7a8a6351665975ed8b5081d.json | Expose request id at the ServerHttpRequest level
Hiding it (at AbstractServerHttpRequest) complicates matters since
requests are often mutated and decorated, plus it's also possible to
implement the interface directly (we've one, albeit corner case).
Issue: SPR-16966 | spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpRequestDecorator.java | @@ -55,6 +55,11 @@ public ServerHttpRequest getDelegate() {
// ServerHttpRequest delegation methods...
+ @Override
+ public String getId() {
+ return getDelegate().getId();
+ }
+
@Override
@Nullable
public HttpMethod getMethod() { | true |
Other | spring-projects | spring-framework | bc3cf0eeb8b96a75a7a8a6351665975ed8b5081d.json | Expose request id at the ServerHttpRequest level
Hiding it (at AbstractServerHttpRequest) complicates matters since
requests are often mutated and decorated, plus it's also possible to
implement the interface directly (we've one, albeit corner case).
Issue: SPR-16966 | spring-web/src/main/java/org/springframework/http/server/reactive/UndertowServerHttpRequest.java | @@ -129,7 +129,7 @@ public <T> T getNativeRequest() {
}
@Override
- protected String initConnectionId() {
+ protected String initId() {
return ObjectUtils.getIdentityHexString(this.exchange.getConnection());
}
| true |
Other | spring-projects | spring-framework | bc3cf0eeb8b96a75a7a8a6351665975ed8b5081d.json | Expose request id at the ServerHttpRequest level
Hiding it (at AbstractServerHttpRequest) complicates matters since
requests are often mutated and decorated, plus it's also possible to
implement the interface directly (we've one, albeit corner case).
Issue: SPR-16966 | spring-web/src/main/java/org/springframework/web/server/adapter/HttpWebHandlerAdapter.java | @@ -29,13 +29,11 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.codec.LoggingCodecSupport;
import org.springframework.http.codec.ServerCodecConfigurer;
-import org.springframework.http.server.reactive.AbstractServerHttpRequest;
import org.springframework.http.server.reactive.HttpHand... | true |
Other | spring-projects | spring-framework | bc3cf0eeb8b96a75a7a8a6351665975ed8b5081d.json | Expose request id at the ServerHttpRequest level
Hiding it (at AbstractServerHttpRequest) complicates matters since
requests are often mutated and decorated, plus it's also possible to
implement the interface directly (we've one, albeit corner case).
Issue: SPR-16966 | spring-webflux/src/main/java/org/springframework/web/reactive/function/server/DefaultServerRequestBuilder.java | @@ -178,7 +178,7 @@ public ServerRequest.Builder attributes(Consumer<Map<String, Object>> attributes
@Override
public ServerRequest build() {
- ServerHttpRequest serverHttpRequest = new BuiltServerHttpRequest(
+ ServerHttpRequest serverHttpRequest = new BuiltServerHttpRequest(this.exchange.getRequest().getId(),... | true |
Other | spring-projects | spring-framework | 37a3765a4eb7d0d06e80a1c1de2440ddac58eeef.json | Fix checkstyle errors | spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java | @@ -81,7 +81,7 @@ public static RequestPredicate all() {
/**
* Return a {@code RequestPredicate} that matches if the request's HTTP method is equal to the
- * given method
+ * given method.
* @param httpMethod the HTTP method to match against
* @return a predicate that tests against the given HTTP method... | true |
Other | spring-projects | spring-framework | 37a3765a4eb7d0d06e80a1c1de2440ddac58eeef.json | Fix checkstyle errors | spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctions.java | @@ -483,7 +483,7 @@ public interface Builder {
* {@code OrderController.routerFunction()}.
* to the {@code changeUser} method in {@code userController}:
* <pre class="code">
- * RouterFunction<ServerResponse> route =
+ * RouterFunction<ServerResponse> route =
* RouterFunctions.route()
* ... | true |
Other | spring-projects | spring-framework | 91e96d8084acb7d92a1a2f086f30cd3381b26440.json | Improve RouterFunction builder
This commit improves the RouterFunctions.Builder based on conversations
had during the weekly team meeting.
Issue: SPR-16953 | spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctionBuilder.java | @@ -26,7 +26,7 @@
import reactor.core.publisher.Mono;
-import org.springframework.http.HttpMethod;
+import org.springframework.core.io.Resource;
import org.springframework.util.Assert;
/**
@@ -40,89 +40,111 @@ class RouterFunctionBuilder implements RouterFunctions.Builder {
private List<HandlerFilterFuncti... | true |
Other | spring-projects | spring-framework | 91e96d8084acb7d92a1a2f086f30cd3381b26440.json | Improve RouterFunction builder
This commit improves the RouterFunctions.Builder based on conversations
had during the weekly team meeting.
Issue: SPR-16953 | spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctions.java | @@ -42,6 +42,8 @@
/**
* <strong>Central entry point to Spring's functional web framework.</strong>
* Exposes routing functionality, such as to
+ * {@linkplain #route() create} a {@code RouterFunction} using a discoverable builder-style API,
+ * to
* {@linkplain #route(RequestPredicate, HandlerFunction) create} a... | true |
Other | spring-projects | spring-framework | 91e96d8084acb7d92a1a2f086f30cd3381b26440.json | Improve RouterFunction builder
This commit improves the RouterFunctions.Builder based on conversations
had during the weekly team meeting.
Issue: SPR-16953 | spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionBuilderTests.java | @@ -23,8 +23,11 @@
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
+import org.springframework.http.Med... | true |
Other | spring-projects | spring-framework | 31024b1f933cd951a67cb543ad51126b44b7da59.json | Add sections on logging for Spring MVC and WebFlux
Issue: SPR-17032 | src/docs/asciidoc/web/webflux.adoc | @@ -712,6 +712,76 @@ a heartbeat and ignore.
+[[webflux-logging]]
+=== Logging
+[.small]#<<web.adoc#mvc-logging,Same in Spring MVC>>#
+
+DEBUG level logging in Spring WebFlux is designed to be compact, minimal, and
+human-friendly. It focuses on high value bits of information that are useful over and
+over again ... | true |
Other | spring-projects | spring-framework | 31024b1f933cd951a67cb543ad51126b44b7da59.json | Add sections on logging for Spring MVC and WebFlux
Issue: SPR-17032 | src/docs/asciidoc/web/webmvc.adoc | @@ -1036,6 +1036,63 @@ Once the Servlet 3.0 configuration is in place, simply add a bean of type
+[[mvc-logging]]
+=== Logging
+[.small]#<<web-reactive.adoc#webflux-logging,Same in Spring WebFlux>>#
+
+DEBUG level logging in Spring MVC is designed to be compact, minimal, and
+human-friendly. It focuses on high va... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultJCacheOperationSource.java | @@ -172,7 +172,7 @@ public void afterSingletonsInstantiated() {
@Override
protected <T> T getBean(Class<T> type) {
- Assert.state(this.beanFactory != null, "BeanFactory required for resolution of [" + type + "]");
+ Assert.state(this.beanFactory != null, () -> "BeanFactory required for resolution of [" + type +... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-context/src/main/java/org/springframework/cache/support/NoOpCacheManager.java | @@ -55,7 +55,7 @@ public class NoOpCacheManager implements CacheManager {
public Cache getCache(String name) {
Cache cache = this.caches.get(name);
if (cache == null) {
- this.caches.putIfAbsent(name, new NoOpCache(name));
+ this.caches.computeIfAbsent(name, key -> new NoOpCache(name));
synchronized (th... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-test/src/main/java/org/springframework/test/web/servlet/DefaultMvcResult.java | @@ -147,7 +147,7 @@ public Object getAsyncResult(long timeToWait) {
" was not set during the specified timeToWait=" + timeToWait);
}
Object result = this.asyncResult.get();
- Assert.state(result != RESULT_NONE, "Async result for handler [" + this.handler + "] was not set");
+ Assert.state(result != RESULT... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-web/src/main/java/org/springframework/web/server/ServerWebExchange.java | @@ -90,7 +90,7 @@ default <T> T getAttribute(String name) {
@SuppressWarnings("unchecked")
default <T> T getRequiredAttribute(String name) {
T value = getAttribute(name);
- Assert.notNull(value, "Required attribute '" + name + "' is missing.");
+ Assert.notNull(value, () -> "Required attribute '" + name + "' i... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-web/src/main/java/org/springframework/web/server/WebSession.java | @@ -71,7 +71,7 @@ default <T> T getAttribute(String name) {
@SuppressWarnings("unchecked")
default <T> T getRequiredAttribute(String name) {
T value = getAttribute(name);
- Assert.notNull(value, "Required attribute '" + name + "' is missing.");
+ Assert.notNull(value, () -> "Required attribute '" + name + "' i... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctions.java | @@ -94,7 +94,7 @@ private static ExchangeFilterFunction basicAuthenticationInternal(
return ExchangeFilterFunction.ofRequestProcessor(request ->
credentialsFunction.apply(request)
.map(credentials -> Mono.just(insertAuthorizationHeader(request, credentials)))
- .orElse(Mono.just(request)));
+ .... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ModelInitializer.java | @@ -139,7 +139,7 @@ private String getAttributeName(MethodParameter param) {
.ofNullable(AnnotatedElementUtils.findMergedAnnotation(param.getAnnotatedElement(), ModelAttribute.class))
.filter(ann -> StringUtils.hasText(ann.value()))
.map(ModelAttribute::value)
- .orElse(Conventions.getVariableNameForP... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java | @@ -244,7 +244,7 @@ protected StringBuilder expandTargetUrlTemplate(String targetUrl,
while (found) {
String name = matcher.group(1);
Object value = (model.containsKey(name) ? model.get(name) : uriVariables.get(name));
- Assert.notNull(value, "No value for URI variable '" + name + "'");
+ Assert.notNull(... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-webflux/src/main/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandler.java | @@ -286,7 +286,7 @@ private String getNameForReturnValue(MethodParameter returnType) {
return Optional.ofNullable(returnType.getMethodAnnotation(ModelAttribute.class))
.filter(ann -> StringUtils.hasText(ann.value()))
.map(ModelAttribute::value)
- .orElse(Conventions.getVariableNameForParameter(returnTyp... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ReactiveTypeHandler.java | @@ -120,7 +120,7 @@ public ResponseBodyEmitter handleValue(Object returnValue, MethodParameter retur
Assert.notNull(returnValue, "Expected return value");
ReactiveAdapter adapter = this.reactiveRegistry.getAdapter(returnValue.getClass());
- Assert.state(adapter != null, "Unexpected return value: " + returnValu... | true |
Other | spring-projects | spring-framework | f8340838b32ab4ae002dd720025073c16fa01c65.json | Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074 | spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java | @@ -159,7 +159,7 @@ public BeanDefinition parse(Element element, ParserContext context) {
List<String> paths = Arrays.asList(StringUtils.tokenizeToStringArray(pathAttribute, ","));
for (String path : paths) {
path = path.trim();
- Assert.state(StringUtils.hasText(path), "Invalid <stomp-endpoint> path at... | true |
Other | spring-projects | spring-framework | 23bda9a5a74780dd2c56829caa23766e5ffbbb31.json | Fix compiler warnings | spring-test/src/main/java/org/springframework/test/web/reactive/server/JsonPathAssertions.java | @@ -183,4 +183,9 @@ public boolean equals(Object obj) {
"to avoid being used in error instead of JsonPathAssertions#isEqualTo(String).");
}
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
} | true |
Other | spring-projects | spring-framework | 23bda9a5a74780dd2c56829caa23766e5ffbbb31.json | Fix compiler warnings | spring-test/src/main/java/org/springframework/test/web/reactive/server/XpathAssertions.java | @@ -195,6 +195,11 @@ public boolean equals(Object obj) {
"to avoid being used in error instead of XPathAssertions#isEqualTo(String).");
}
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
/**
* Lets us be able to use lambda expressions that could throw checked exceptions, since | true |
Other | spring-projects | spring-framework | 4475c67ba86fa31b086704dff111d5970836bcf8.json | Fix checkstyle violation | spring-web/src/main/java/org/springframework/web/filter/reactive/ForwardedHeaderFilter.java | @@ -39,6 +39,7 @@
* where "Forwarded" and "X-Forwarded-*" headers are eliminated, and not used.
*
* @author Arjen Poutsma
+ * @author Rossen Stoyanchev
* @since 5.0
* @see <a href="https://tools.ietf.org/html/rfc7239">https://tools.ietf.org/html/rfc7239</a>
*/
@@ -71,7 +72,6 @@ public void setRemoveOnly(boo... | false |
Other | spring-projects | spring-framework | 2fdb8c9c8c0025c533d99e3a8c793af5cae404ac.json | Update STOMP section on working with subscriptions
1. Revise @SubscribeMapping to address common points of confusion.
2. Add ExecutorSubsribableChannel.
3. Split Events and Interception in two.
Issue: SPR-16950 | src/docs/asciidoc/web/websocket.adoc | @@ -1296,18 +1296,53 @@ See <<websocket-stomp-handle-send>>.
[[websocket-stomp-subscribe-mapping]]
==== `@SubscribeMapping`
-`@SubscribeMapping` is similar to `@MessageMapping` but also narrows the mapping to
-subscription messages only. Methods with `@SubscribeMapping` support the same
-<<websocket-stomp-message-m... | false |
Other | spring-projects | spring-framework | 91e39d558f1a95bd1a49f29e9636135085bc628f.json | Use ArrayList instead of LinkedList for known size
Spring JDBC unlike other modules uses LinkedList instead of ArrayList
in several places. There is a large body of evidence suggesting that on
contemporary hardware ArrayList is both faster and has less overhead
than even in degenerate cases of empty lists [3] or unkno... | spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlParameter.java | @@ -16,6 +16,7 @@
package org.springframework.jdbc.core;
+import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@@ -184,12 +185,16 @@ public boolean isResultsParameter() {
* to a List of SqlParameter objects as used in this package.
*/
public static List<SqlParameter> sqlTypes... | true |
Other | spring-projects | spring-framework | 91e39d558f1a95bd1a49f29e9636135085bc628f.json | Use ArrayList instead of LinkedList for known size
Spring JDBC unlike other modules uses LinkedList instead of ArrayList
in several places. There is a large body of evidence suggesting that on
contemporary hardware ArrayList is both faster and has less overhead
than even in degenerate cases of empty lists [3] or unkno... | spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java | @@ -20,7 +20,6 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -423,7 +422,7 @@ public static int[] buildSqlTypeArray(ParsedSql parsedSql, SqlParameterSource pa
*/
public s... | true |
Other | spring-projects | spring-framework | c88f11f9583bf5123d7f51d81fe4c1bbe40d6e51.json | Avoid deprecation warnings on JDK 9 in spring-test | spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionTestCase.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -99,7 +99,7 @@ void autowiredFields() {
a... | true |
Other | spring-projects | spring-framework | c88f11f9583bf5123d7f51d81fe4c1bbe40d6e51.json | Avoid deprecation warnings on JDK 9 in spring-test | spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterAutowiredConstructorInjectionTestCase.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,7 +77,7 @@ void beansInjected() {
@Tes... | true |
Other | spring-projects | spring-framework | c88f11f9583bf5123d7f51d81fe4c1bbe40d6e51.json | Avoid deprecation warnings on JDK 9 in spring-test | spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterConstructorInjectionTestCase.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,7 +80,7 @@ void beansInjected() {
@Tes... | true |
Other | spring-projects | spring-framework | c88f11f9583bf5123d7f51d81fe4c1bbe40d6e51.json | Avoid deprecation warnings on JDK 9 in spring-test | spring-test/src/test/java/org/springframework/test/context/junit4/orm/HibernateSessionFlushingTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -74,7 +74,7 @@ public void findSam() {
as... | true |
Other | spring-projects | spring-framework | c88f11f9583bf5123d7f51d81fe4c1bbe40d6e51.json | Avoid deprecation warnings on JDK 9 in spring-test | spring-test/src/test/java/org/springframework/test/context/transaction/TransactionalTestExecutionListenerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
import org.junit.rules.Expec... | true |
Other | spring-projects | spring-framework | c88f11f9583bf5123d7f51d81fe4c1bbe40d6e51.json | Avoid deprecation warnings on JDK 9 in spring-test | spring-test/src/test/java/org/springframework/test/util/ReflectionTestUtilsTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@
*/
public class Reflection... | true |
Other | spring-projects | spring-framework | e39bf87b07a84247a8edc7a8e50451743fe7ff45.json | Add reference docs for DataBufferUtils.compose
Issue: SPR-16365 | src/docs/asciidoc/core/core-databuffer-codec.adoc | @@ -145,8 +145,12 @@ It contains methods for reading a `Flux` of `DataBuffer` objects from an `InputS
`DataBufferUtils` also exposes `retain` and `release` methods that operate on plain `DataBuffer`
instances (so that casting to a `PooledDataBuffer` is not required).
-
-
+Additionally, `DataBufferUtils` exposes `co... | false |
Other | spring-projects | spring-framework | c60313de3f0797f987bc7a392d75aebd17020158.json | Refine UriTemplate match pattern
The match/matches methods of UriTemplate use a regex with (.*) in place
of URI variables, which work fine except in the end where such a
pattern can match greedily more than one segment.
This commit updates the regex to use ([^/]*) instead since URI
variables are only meant to be used... | spring-web/src/main/java/org/springframework/web/util/UriTemplate.java | @@ -212,7 +212,7 @@ else if (c == '}') {
String variable = builder.toString();
int idx = variable.indexOf(':');
if (idx == -1) {
- pattern.append("(.*)");
+ pattern.append("([^/]*)");
variableNames.add(variable);
}
else { | true |
Other | spring-projects | spring-framework | c60313de3f0797f987bc7a392d75aebd17020158.json | Refine UriTemplate match pattern
The match/matches methods of UriTemplate use a regex with (.*) in place
of URI variables, which work fine except in the end where such a
pattern can match greedily more than one segment.
This commit updates the regex to use ([^/]*) instead since URI
variables are only meant to be used... | spring-web/src/test/java/org/springframework/web/util/UriTemplateTests.java | @@ -153,9 +153,7 @@ public void matchCustomRegex() throws Exception {
assertEquals("Invalid match", expected, result);
}
- // SPR-13627
-
- @Test
+ @Test // SPR-13627
public void matchCustomRegexWithNestedCurlyBraces() throws Exception {
UriTemplate template = new UriTemplate("/site.{domain:co.[a-z]{2}}");
... | true |
Other | spring-projects | spring-framework | cdf2ab973783062ba55cc9fbd2ad881eae094647.json | Expand docs on WebFlux.fn + @EnableWebFlux
Issue: SPR-16360 | src/docs/asciidoc/web/webflux-functional.adoc | @@ -1,10 +1,10 @@
[[webflux-fn]]
= Functional Endpoints
-Spring WebFlux provides a lightweight, functional programming model where functions
-are used to route and handle requests and where contracts are designed for immutability.
-It is an alternative to the annotated-based programming model but runs on the same
-... | false |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-web/src/main/java/org/springframework/http/codec/FormHttpMessageReader.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,6 @@
import reactor.core.publishe... | true |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-web/src/main/java/org/springframework/http/codec/xml/XmlEventDecoder.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -103,7 +103,7 @@ public Flux<XMLEvent> decod... | true |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-web/src/test/java/org/springframework/http/server/reactive/MultipartIntegrationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,6 @@
import reactor.core.publishe... | true |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-webflux/src/main/java/org/springframework/web/reactive/resource/AppCacheManifestTransformer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,6 @@
import reactor.core.publishe... | true |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-webflux/src/main/java/org/springframework/web/reactive/resource/ContentVersionStrategy.java | @@ -1,11 +1,11 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
... | true |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-webflux/src/main/java/org/springframework/web/reactive/resource/CssLinkResourceTransformer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,6 @@
import reactor.core.publishe... | true |
Other | spring-projects | spring-framework | 8a129ef3daf8a28728314905d4b843a4129d9a87.json | Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351 | spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -65,7 +65,7 @@
import org.springframework.u... | true |
Other | spring-projects | spring-framework | 69ccba30e978351acdee12b990f989e97b8a72b0.json | Introduce write aggregator to DataBufferUtils
As a consequence of dropping CompositeByteBuf (see prior commit),
DataBuffers fluxes that are aggregated with Flux.reduce(BiFunction) are
now required to be released, as the composite no longer holds a
reference to subsequent data buffers.
For this purpose, DataBufferUtil... | spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@
import java.util.concurrent.... | true |
Other | spring-projects | spring-framework | 69ccba30e978351acdee12b990f989e97b8a72b0.json | Introduce write aggregator to DataBufferUtils
As a consequence of dropping CompositeByteBuf (see prior commit),
DataBuffers fluxes that are aggregated with Flux.reduce(BiFunction) are
now required to be released, as the composite no longer holds a
reference to subsequent data buffers.
For this purpose, DataBufferUtil... | spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,20 +24,23 @@
import java.nio.channels.F... | true |
Other | spring-projects | spring-framework | e6893da9714cf557a36691dcefc8209bfff1e98d.json | Remove use of CompositeByteBuf in NettyDataBuffer
Prior to this commit, NettyDataBuffer had a optimization in
write(ByteBuf...), where it used a CompositeByteBuf to hold the original
and the parameter buffer.
Unfortunately, this procedure has nasty consequences when splicing
buffers (see https://stackoverflow.com/a/48... | spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBuffer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,11 +25,8 @@
import io.netty.buffer.Byte... | true |
Other | spring-projects | spring-framework | e6893da9714cf557a36691dcefc8209bfff1e98d.json | Remove use of CompositeByteBuf in NettyDataBuffer
Prior to this commit, NettyDataBuffer had a optimization in
write(ByteBuf...), where it used a CompositeByteBuf to hold the original
and the parameter buffer.
Unfortunately, this procedure has nasty consequences when splicing
buffers (see https://stackoverflow.com/a/48... | spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -303,7 +303,7 @@ public void writeDataBuffer... | true |
Other | spring-projects | spring-framework | 5ed0cf902727d7c295768c7b8dd931d3392de5f7.json | Fix init issues in AbstractReactiveWebInitializer
Issue: SPR-16290 | spring-web/src/main/java/org/springframework/web/server/adapter/AbstractReactiveWebInitializer.java | @@ -16,10 +16,13 @@
package org.springframework.web.server.adapter;
import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import org.springframework.context.A... | false |
Other | spring-projects | spring-framework | 50b46c9e35722475dcec32a31e5461b3d3dddf1f.json | Fix source code in doc
Closes gh-1640 | src/docs/asciidoc/testing-webtestclient.adoc | @@ -223,7 +223,7 @@ Or if you want to assert there is no response content, use this:
.body(personMono, Person.class)
.exchange()
.expectStatus().isCreated()
- .expectBody().isEmpty;
+ .expectBody().isEmpty();
----
| false |
Other | spring-projects | spring-framework | c326e444885584261cd00cac3fdf83eaacfd3bb6.json | Refine forwarded protocol support
This commit refines forwarded protocol support in order to support
proxies that only set "X-Forwarded-Proto" header and not
"X-Forwarded-Port" by performing a reset of the port in such case.
"Forwarded" header support has been updated accordingly since it
also supports similar use ca... | spring-web/src/main/java/org/springframework/web/cors/reactive/CorsUtils.java | @@ -51,7 +51,8 @@ public static boolean isPreFlightRequest(ServerHttpRequest request) {
/**
* Check if the request is a same-origin one, based on {@code Origin}, {@code Host},
- * {@code Forwarded} and {@code X-Forwarded-Host} headers.
+ * {@code Forwarded}, {@code X-Forwarded-Proto}, {@code X-Forwarded-Host} ... | true |
Other | spring-projects | spring-framework | c326e444885584261cd00cac3fdf83eaacfd3bb6.json | Refine forwarded protocol support
This commit refines forwarded protocol support in order to support
proxies that only set "X-Forwarded-Proto" header and not
"X-Forwarded-Port" by performing a reset of the port in such case.
"Forwarded" header support has been updated accordingly since it
also supports similar use ca... | spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java | @@ -53,6 +53,7 @@
* @author Phillip Webb
* @author Oliver Gierke
* @author Brian Clozel
+ * @author Sebastien Deleuze
* @since 3.1
* @see #newInstance()
* @see #fromPath(String)
@@ -731,16 +732,23 @@ UriComponentsBuilder adaptFromForwardedHeaders(HttpHeaders headers) {
String forwardedHeader = headers.ge... | true |
Other | spring-projects | spring-framework | c326e444885584261cd00cac3fdf83eaacfd3bb6.json | Refine forwarded protocol support
This commit refines forwarded protocol support in order to support
proxies that only set "X-Forwarded-Proto" header and not
"X-Forwarded-Port" by performing a reset of the port in such case.
"Forwarded" header support has been updated accordingly since it
also supports similar use ca... | spring-web/src/main/java/org/springframework/web/util/WebUtils.java | @@ -686,7 +686,8 @@ else if (CollectionUtils.isEmpty(allowedOrigins)) {
/**
* Check if the request is a same-origin one, based on {@code Origin}, {@code Host},
- * {@code Forwarded} and {@code X-Forwarded-Host} headers.
+ * {@code Forwarded}, {@code X-Forwarded-Proto}, {@code X-Forwarded-Host} and
+ * @code X... | true |
Other | spring-projects | spring-framework | c326e444885584261cd00cac3fdf83eaacfd3bb6.json | Refine forwarded protocol support
This commit refines forwarded protocol support in order to support
proxies that only set "X-Forwarded-Proto" header and not
"X-Forwarded-Port" by performing a reset of the port in such case.
"Forwarded" header support has been updated accordingly since it
also supports similar use ca... | spring-web/src/test/java/org/springframework/web/cors/reactive/CorsUtilsTests.java | @@ -66,4 +66,54 @@ public void isNotPreFlightRequest() {
assertFalse(CorsUtils.isPreFlightRequest(request));
}
+ @Test // SPR-16262
+ public void isSameOriginWithXForwardedHeaders() {
+ assertTrue(checkSameOriginWithXForwardedHeaders("mydomain1.com", -1, "https", null, -1, "https://mydomain1.com"));
+ assertT... | true |
Other | spring-projects | spring-framework | c326e444885584261cd00cac3fdf83eaacfd3bb6.json | Refine forwarded protocol support
This commit refines forwarded protocol support in order to support
proxies that only set "X-Forwarded-Proto" header and not
"X-Forwarded-Port" by performing a reset of the port in such case.
"Forwarded" header support has been updated accordingly since it
also supports similar use ca... | spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java | @@ -413,6 +413,22 @@ public void fromHttpRequestWithForwardedHostWithDefaultPort() {
assertEquals(-1, result.getPort());
}
+ @Test // SPR-16262
+ public void fromHttpRequestWithForwardedProtoWithDefaultPort() {
+ MockHttpServletRequest request = new MockHttpServletRequest();
+ request.setScheme("http");
+ req... | true |
Other | spring-projects | spring-framework | c326e444885584261cd00cac3fdf83eaacfd3bb6.json | Refine forwarded protocol support
This commit refines forwarded protocol support in order to support
proxies that only set "X-Forwarded-Proto" header and not
"X-Forwarded-Port" by performing a reset of the port in such case.
"Forwarded" header support has been updated accordingly since it
also supports similar use ca... | spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java | @@ -140,6 +140,26 @@ public void isSameOrigin() {
"http://[2001:0db8:0000:85a3:0000:0000:ac1f:8001]:8080"));
}
+ @Test // SPR-16262
+ public void isSameOriginWithXForwardedHeaders() {
+ assertTrue(checkSameOriginWithXForwardedHeaders("mydomain1.com", -1, "https", null, -1, "https://mydomain1.com"));
+ asser... | true |
Other | spring-projects | spring-framework | 30c06163846f8bc5801d3f754def135ed79eb38b.json | Improve error message
Issue: SPR-16214 | spring-webflux/src/main/java/org/springframework/web/reactive/socket/adapter/ReactorNettyWebSocketSession.java | @@ -70,9 +70,10 @@ public Mono<Void> send(Publisher<WebSocketMessage> messages) {
@Override
public Mono<Void> close(CloseStatus status) {
return Mono.error(new UnsupportedOperationException(
- "Currently in Reactor Netty applications are expected to use the " +
- "Cancellation returned from subscribing t... | false |
Other | spring-projects | spring-framework | 0d151b02120789f65f79f218c5e87d66b3c8663e.json | Fix SpEL syntax
Issue: SPR-16315 | src/docs/asciidoc/testing.adoc | @@ -3138,7 +3138,6 @@ framework.
.Request-scoped bean configuration
[source,xml,indent=0]
-[subs="verbatim,quotes"]
----
<beans>
| false |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java | @@ -236,7 +236,9 @@ protected Object convertFromInternal(Message<?> message, Class<?> targetClass, @
@Override
@Nullable
- protected Object convertToInternal(Object payload, @Nullable MessageHeaders headers, @Nullable Object conversionHint) {
+ protected Object convertToInternal(Object payload, @Nullable MessageH... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/converter/MarshallingMessageConverter.java | @@ -166,7 +166,9 @@ private Source getSource(Object payload) {
@Override
@Nullable
- protected Object convertToInternal(Object payload, @Nullable MessageHeaders headers, @Nullable Object conversionHint) {
+ protected Object convertToInternal(Object payload, @Nullable MessageHeaders headers,
+ @Nullable Object c... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/core/AbstractMessageSendingTemplate.java | @@ -122,12 +122,16 @@ public void convertAndSend(D destination, Object payload) throws MessagingExcept
}
@Override
- public void convertAndSend(D destination, Object payload, @Nullable Map<String, Object> headers) throws MessagingException {
+ public void convertAndSend(D destination, Object payload, @Nullable Ma... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/core/MessageSendingOperations.java | @@ -104,7 +104,7 @@
* @param headers headers for the message to send
* @param postProcessor the post processor to apply to the message
*/
- void convertAndSend(D destination, Object payload, @Nullable Map<String, Object> headers, @Nullable MessagePostProcessor postProcessor)
- throws MessagingException;
+ vo... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/handler/DestinationPatternsMessageCondition.java | @@ -39,7 +39,8 @@
* @author Rossen Stoyanchev
* @since 4.0
*/
-public class DestinationPatternsMessageCondition extends AbstractMessageCondition<DestinationPatternsMessageCondition> {
+public class DestinationPatternsMessageCondition
+ extends AbstractMessageCondition<DestinationPatternsMessageCondition> {
p... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AbstractNamedValueMethodArgumentResolver.java | @@ -76,7 +76,9 @@ public abstract class AbstractNamedValueMethodArgumentResolver implements Handle
* and {@code #{...}} SpEL expressions in default values, or {@code null} if default
* values are not expected to contain expressions
*/
- protected AbstractNamedValueMethodArgumentResolver(ConversionService cs, @... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/DefaultMessageHandlerMethodFactory.java | @@ -55,7 +55,8 @@
* @see #setValidator
* @see #setCustomArgumentResolvers
*/
-public class DefaultMessageHandlerMethodFactory implements MessageHandlerMethodFactory, BeanFactoryAware, InitializingBean {
+public class DefaultMessageHandlerMethodFactory
+ implements MessageHandlerMethodFactory, BeanFactoryAware, I... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/HandlerMethodArgumentResolverComposite.java | @@ -68,7 +68,9 @@ public HandlerMethodArgumentResolverComposite addResolvers(@Nullable HandlerMeth
/**
* Add the given {@link HandlerMethodArgumentResolver}s.
*/
- public HandlerMethodArgumentResolverComposite addResolvers(@Nullable List<? extends HandlerMethodArgumentResolver> argumentResolvers) {
+ public Han... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/simp/SimpAttributes.java | @@ -43,7 +43,8 @@ public class SimpAttributes {
public static final String SESSION_COMPLETED_NAME = SimpAttributes.class.getName() + ".COMPLETED";
/** Prefix for the name of session attributes used to store destruction callbacks. */
- public static final String DESTRUCTION_CALLBACK_NAME_PREFIX = SimpAttributes.cl... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageHeaderAccessor.java | @@ -88,7 +88,9 @@ public class SimpMessageHeaderAccessor extends NativeMessageHeaderAccessor {
* A constructor for creating new message headers.
* This constructor is protected. See factory methods in this and sub-classes.
*/
- protected SimpMessageHeaderAccessor(SimpMessageType messageType, @Nullable Map<Stri... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessagingTemplate.java | @@ -231,7 +231,7 @@ public void convertAndSendToUser(String user, String destination, Object payload
/**
* Creates a new map and puts the given headers under the key
- * {@link org.springframework.messaging.support.NativeMessageHeaderAccessor#NATIVE_HEADERS NATIVE_HEADERS NATIVE_HEADERS NATIVE_HEADERS}.
+ * {@... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java | @@ -433,7 +433,9 @@ public Set<Subscription> getSubscriptions(String destination) {
@Nullable
public Subscription getSubscription(String subscriptionId) {
- for (Map.Entry<String, Set<DefaultSubscriptionRegistry.Subscription>> destinationEntry : this.destinationLookup.entrySet()) {
+ for (Map.Entry<String, ... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java | @@ -106,7 +106,9 @@ public List<Message<byte[]>> decode(ByteBuffer byteBuffer) {
* @return the decoded messages, or an empty list if none
* @throws StompConversionException raised in case of decoding issues
*/
- public List<Message<byte[]>> decode(ByteBuffer byteBuffer, @Nullable MultiValueMap<String, String> ... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/main/java/org/springframework/messaging/support/AbstractMessageChannel.java | @@ -179,7 +179,9 @@ public void applyPostSend(Message<?> message, MessageChannel channel, boolean se
}
}
- public void triggerAfterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, @Nullable Exception ex) {
+ public void triggerAfterSendCompletion(Message<?> message, MessageChannel cha... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/test/java/org/springframework/messaging/converter/MappingJackson2MessageConverterTests.java | @@ -47,16 +47,19 @@ public class MappingJackson2MessageConverterTests {
@Test
public void defaultConstructor() {
MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
- assertThat(converter.getSupportedMimeTypes(), contains(new MimeType("application", "json", StandardCharsets.UTF_8)... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/test/java/org/springframework/messaging/converter/MessageConverterTests.java | @@ -157,12 +157,16 @@ protected boolean supports(Class<?> clazz) {
}
@Override
- protected Object convertFromInternal(Message<?> message, Class<?> targetClass, @Nullable Object conversionHint) {
+ protected Object convertFromInternal(Message<?> message, Class<?> targetClass,
+ @Nullable Object conversionHi... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/test/java/org/springframework/messaging/core/CachingDestinationResolverTests.java | @@ -32,25 +32,25 @@ public class CachingDestinationResolverTests {
@Test
public void cachedDestination() {
@SuppressWarnings("unchecked")
- DestinationResolver<String> destinationResolver = mock(DestinationResolver.class);
- CachingDestinationResolverProxy<String> cachingDestinationResolver = new CachingDestin... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/AnnotationExceptionHandlerMethodResolverTests.java | @@ -37,56 +37,53 @@
*/
public class AnnotationExceptionHandlerMethodResolverTests {
+ private final AnnotationExceptionHandlerMethodResolver resolver =
+ new AnnotationExceptionHandlerMethodResolver(ExceptionController.class);
+
+
@Test
public void resolveMethodFromAnnotation() {
- AnnotationExceptionHandle... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessageTypeMessageConditionTests.java | @@ -32,14 +32,17 @@ public class SimpMessageTypeMessageConditionTests {
@Test
public void combine() {
- SimpMessageType actual = condition(SimpMessageType.MESSAGE).combine(condition(SimpMessageType.SUBSCRIBE)).getMessageType();
- assertEquals(SimpMessageType.SUBSCRIBE, actual);
+ SimpMessageType messageType = ... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java | @@ -67,6 +67,7 @@
import org.springframework.stereotype.Controller;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.MimeTypeUtils;
+import org.springframework.util.PathMatcher;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
import org... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/DefaultStompSessionTests.java | @@ -217,7 +217,8 @@ public void handleErrorFrame() throws Exception {
StompHeaders stompHeaders = StompHeaders.readOnlyStompHeaders(accessor.getNativeHeaders());
when(this.sessionHandler.getPayloadType(stompHeaders)).thenReturn(String.class);
- this.session.handleMessage(MessageBuilder.createMessage(payload.ge... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerIntegrationTests.java | @@ -49,7 +49,9 @@
import org.springframework.util.Assert;
import org.springframework.util.SocketUtils;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
/**
* Integration tests for {@link S... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java | @@ -31,8 +31,15 @@
import org.springframework.util.MimeTypeUtils;
import org.springframework.util.SerializationTestUtils;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.*;
+import static org.hamcrest.CoreMatchers.startsWith;
+import static org.junit.Assert.assertEquals;
+import static o... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-web/src/main/java/org/springframework/http/HttpStatus.java | @@ -216,36 +216,42 @@ public enum HttpStatus {
CONFLICT(409, "Conflict"),
/**
* {@code 410 Gone}.
- * @see <a href="http://tools.ietf.org/html/rfc7231#section-6.5.9">HTTP/1.1: Semantics and Content, section 6.5.9</a>
+ * @see <a href="http://tools.ietf.org/html/rfc7231#section-6.5.9">
+ * HTTP/1.1: Semant... | true |
Other | spring-projects | spring-framework | 1cc5afe24b592a50ab68c090e438138ab180374a.json | Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping | spring-web/src/main/java/org/springframework/http/MediaType.java | @@ -45,7 +45,8 @@
* @author Sebastien Deleuze
* @author Kazuki Shimizu
* @since 3.0
- * @see <a href="http://tools.ietf.org/html/rfc7231#section-3.1.1.1">HTTP 1.1: Semantics and Content, section 3.1.1.1</a>
+ * @see <a href="http://tools.ietf.org/html/rfc7231#section-3.1.1.1">
+ * HTTP 1.1: Semantics and Cont... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.