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 | 211f0bbf885a3d291f45c4a10db6cc5c0243b14f.json | Fix invalid characters in source files
Closes gh-27475 | spring-expression/src/main/java/org/springframework/expression/spel/ast/BeanReference.java | @@ -25,8 +25,8 @@
import org.springframework.expression.spel.SpelMessage;
/**
- * Represents a bean reference to a type, for example <tt>@foo</tt> or <tt>@'foo.bar'</tt>.
- * For a FactoryBean the syntax <tt>&foo</tt> can be used to access the factory itself.
+ * Represents a bean reference to a type, for example {... | true |
Other | spring-projects | spring-framework | e6112344d20b9a744ca44073cc1331a0a9e691b4.json | Remove support for RxJava 2.x as well
Includes realignment of Reactor adapter registration.
Closes gh-27443 | build.gradle | @@ -64,7 +64,6 @@ configure(allprojects) { project ->
entry 'groovy-xml'
}
- dependency "io.reactivex.rxjava2:rxjava:2.2.21"
dependency "io.reactivex.rxjava3:rxjava:3.1.1"
dependency "io.smallrye.reactive:mutiny:1.0.0"
dependency "io.projectreactor.tools:blockhound:1.0.4.RELEASE" | true |
Other | spring-projects | spring-framework | e6112344d20b9a744ca44073cc1331a0a9e691b4.json | Remove support for RxJava 2.x as well
Includes realignment of Reactor adapter registration.
Closes gh-27443 | spring-core/spring-core.gradle | @@ -44,7 +44,6 @@ dependencies {
optional("org.jetbrains.kotlinx:kotlinx-coroutines-core")
optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
optional("io.projectreactor:reactor-core")
- optional("io.reactivex.rxjava2:rxjava")
optional("io.reactivex.rxjava3:rxjava")
optional("io.smallrye.reactive:mu... | true |
Other | spring-projects | spring-framework | e6112344d20b9a744ca44073cc1331a0a9e691b4.json | Remove support for RxJava 2.x as well
Includes realignment of Reactor adapter registration.
Closes gh-27443 | spring-core/src/main/java/org/springframework/core/ReactiveAdapterRegistry.java | @@ -58,8 +58,6 @@ public class ReactiveAdapterRegistry {
private static final boolean reactorPresent;
- private static final boolean rxjava2Present;
-
private static final boolean rxjava3Present;
private static final boolean kotlinCoroutinesPresent;
@@ -69,7 +67,6 @@ public class ReactiveAdapterRegistry {
... | true |
Other | spring-projects | spring-framework | e6112344d20b9a744ca44073cc1331a0a9e691b4.json | Remove support for RxJava 2.x as well
Includes realignment of Reactor adapter registration.
Closes gh-27443 | spring-core/src/test/java/org/springframework/core/ReactiveAdapterRegistryTests.java | @@ -43,16 +43,13 @@ class ReactiveAdapterRegistryTests {
private static final Duration ONE_SECOND = Duration.ofSeconds(1);
-
private final ReactiveAdapterRegistry registry = ReactiveAdapterRegistry.getSharedInstance();
@Test
void getAdapterForReactiveSubType() {
-
ReactiveAdapter adapter1 = getAdapte... | true |
Other | spring-projects | spring-framework | e6112344d20b9a744ca44073cc1331a0a9e691b4.json | Remove support for RxJava 2.x as well
Includes realignment of Reactor adapter registration.
Closes gh-27443 | src/docs/asciidoc/web-reactive.adoc | @@ -34,8 +34,6 @@ discussion of mock objects.
response objects to provide support for testing WebFlux applications without an HTTP
server. You can use the `WebTestClient` for end-to-end integration tests, too.
-
-
include::rsocket.adoc[leveloffset=+1]
@@ -55,14 +53,8 @@ For annotated controllers, WebFlux trans... | true |
Other | spring-projects | spring-framework | 50f20162934c1d3282615dce6696e3b56141f7ac.json | Fix timezone specific failing test
Update `MvcNamespaceTests` so that the asserted time is in UTC. | spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java | @@ -246,7 +246,7 @@ public void testDefaultConfig() throws Exception {
adapter.handle(request, response, handlerMethod);
assertThat(handler.recordedValidationError).isTrue();
- assertThat(handler.date).isInSameDayAs("2009-10-31");
+ assertThat(handler.date).isInSameDayAs("2009-10-31T00:00:00+00:00");
asser... | false |
Other | spring-projects | spring-framework | 66b15efa215ee5b1cd060825681e366cb437e4ba.json | Upgrade CI image to JDK 17+35 | ci/images/get-jdk-url.sh | @@ -3,7 +3,7 @@ set -e
case "$1" in
java17)
- echo "https://github.com/adoptium/temurin17-binaries/releases/download/jdk17-2021-09-15-08-15-beta/OpenJDK17-jdk_x64_linux_hotspot_2021-09-15-08-15.tar.gz"
+ echo "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_linux_... | false |
Other | spring-projects | spring-framework | b808b53bcc4633f0622c7038df310b04e34bfe7b.json | Remove unnecessary cast in ContentRequestMatchers | spring-test/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java | @@ -240,7 +240,7 @@ private RequestMatcher multipartData(MultiValueMap<String, ?> expectedMap, boole
}
if (expected instanceof byte[]) {
assertTrue("Multipart is not a file", actual instanceof byte[]);
- assertEquals("Multipart content", expected, (byte[]) actual);
+ assertEquals("Multipart... | false |
Other | spring-projects | spring-framework | 9bd74c270f880b8c2d98f13eefda0fe98f372029.json | Remove flaky check in MBeanClientInterceptorTests
Prior to this commit, the testTestLazyConnectionToRemote() method in
MBeanClientInterceptorTests expected an exception to be thrown while
attempting to access the state of a proxied MBean after the MBeanServer
had been shutdown; however, the test occasionally failed if... | spring-context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java | @@ -24,21 +24,18 @@
import java.net.BindException;
import java.util.HashMap;
import java.util.Map;
-import java.util.concurrent.TimeUnit;
import javax.management.Descriptor;
import javax.management.MBeanServerConnection;
import javax.management.remote.JMXConnectorServer;
import javax.management.remote.JMXConne... | false |
Other | spring-projects | spring-framework | 99c2b1e2423628b4b444b6a752e2dfc1aadce3a4.json | Add snippet for maxInMemorySize config
See gh-23961 | src/docs/asciidoc/web/webflux.adoc | @@ -831,10 +831,10 @@ with one object in the stream.
To configure buffer sizes, you can check if a given `Decoder` or `HttpMessageReader`
exposes a `maxInMemorySize` property and if so the Javadoc will have details about default
-values. In WebFlux, the `ServerCodecConfigurer` provides a
-<<webflux-config-message-c... | false |
Other | spring-projects | spring-framework | 95ef9c25c2f68b25e430922aad091dd985cf2a6f.json | Reduce byte[] allocations in StompEncoder
Closes gh-24694 | spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompEncoder.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,10 @@
package org.springframew... | false |
Other | spring-projects | spring-framework | 8b3521d2bfc75c97a99da51444489decc32105ff.json | Fix typo in webflux-cors.adoc
Closes gh-24815 | src/docs/asciidoc/web/webflux-cors.adoc | @@ -50,7 +50,7 @@ Each `HandlerMapping` can be
{api-spring-framework}/web/reactive/handler/AbstractHandlerMapping.html#setCorsConfigurations-java.util.Map-[configured]
individually with URL pattern-based `CorsConfiguration` mappings. In most cases, applications
use the WebFlux Java configuration to declare such mapp... | false |
Other | spring-projects | spring-framework | f8ff4e42b91ec7098d6979e72b8c88601f476d5b.json | Use try-with-resource to close resources
Closes gh-24807 | spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderUtils.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -182,18 +182,14 @@ public static Properties ... | true |
Other | spring-projects | spring-framework | f8ff4e42b91ec7098d6979e72b8c88601f476d5b.json | Use try-with-resource to close resources
Closes gh-24807 | spring-web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -240,13 +240,9 @@ protected abstract RemoteI... | true |
Other | spring-projects | spring-framework | f8ff4e42b91ec7098d6979e72b8c88601f476d5b.json | Use try-with-resource to close resources
Closes gh-24807 | spring-web/src/main/java/org/springframework/web/context/support/ServletContextResourcePatternResolver.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -159,22 +159,16 @@ private void doRetrieveMa... | true |
Other | spring-projects | spring-framework | a606fb4b212aeabf632bb22fe863bcbf9fcac9fc.json | Fix checkstyle errors | spring-test/src/test/java/org/springframework/test/web/reactive/server/HttpHandlerConnectorTests.java | @@ -28,7 +28,6 @@
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
-import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils;
import org.springframework.http.HttpCookie;
import org.springframework.http.HttpHeaders;
import o... | true |
Other | spring-projects | spring-framework | a606fb4b212aeabf632bb22fe863bcbf9fcac9fc.json | Fix checkstyle errors | spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java | @@ -45,7 +45,6 @@
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.core.io.buffer.DefaultDataBuffer;
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
-import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils;
import org.springframework.http.Ht... | true |
Other | spring-projects | spring-framework | a606fb4b212aeabf632bb22fe863bcbf9fcac9fc.json | Fix checkstyle errors | spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java | @@ -17,7 +17,6 @@
package org.springframework.web.reactive.result.method.annotation;
import java.net.URI;
-import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
@@ -41,7 +40,6 @@
import org.springframework.core.ResolvableType;
impor... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java | @@ -191,8 +191,8 @@ public DefaultDataBuffer capacity(int newCapacity) {
if (newCapacity > oldCapacity) {
ByteBuffer oldBuffer = this.byteBuffer;
ByteBuffer newBuffer = allocate(newCapacity, oldBuffer.isDirect());
- ((Buffer) oldBuffer).position(0).limit(oldBuffer.capacity());
- ((Buffer) newBuffer).posi... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractEncoderTests.java | @@ -249,10 +249,8 @@ protected final Consumer<DataBuffer> expectBytes(byte[] expected) {
*/
protected Consumer<DataBuffer> expectString(String expected) {
return dataBuffer -> {
- byte[] resultBytes = new byte[dataBuffer.readableByteCount()];
- dataBuffer.read(resultBytes);
+ String actual = dataBuffer.to... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/DataBufferTestUtils.java | @@ -54,9 +54,9 @@ public static byte[] dumpBytes(DataBuffer buffer) {
* @return the string representation of the given data buffer
*/
public static String dumpString(DataBuffer buffer, Charset charset) {
+ Assert.notNull(buffer, "'buffer' must not be null");
Assert.notNull(charset, "'charset' must not be nu... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-test/src/main/java/org/springframework/mock/http/client/reactive/MockClientHttpRequest.java | @@ -48,9 +48,9 @@
*/
public class MockClientHttpRequest extends AbstractClientHttpRequest {
- private HttpMethod httpMethod;
+ private final HttpMethod httpMethod;
- private URI url;
+ private final URI url;
private final DataBufferFactory bufferFactory = new DefaultDataBufferFactory();
@@ -160,9 +160,7 @@... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-test/src/main/java/org/springframework/mock/http/client/reactive/MockClientHttpResponse.java | @@ -134,9 +134,7 @@ public Mono<String> getBodyAsString() {
private static String dumpString(DataBuffer buffer, Charset charset) {
Assert.notNull(charset, "'charset' must not be null");
- byte[] bytes = new byte[buffer.readableByteCount()];
- buffer.read(bytes);
- return new String(bytes, charset);
+ return ... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpResponse.java | @@ -153,10 +153,9 @@ public Mono<String> getBodyAsString() {
private static String bufferToString(DataBuffer buffer, Charset charset) {
Assert.notNull(charset, "'charset' must not be null");
- byte[] bytes = new byte[buffer.readableByteCount()];
- buffer.read(bytes);
+ String str = buffer.toString(charset);
... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/client/reactive/MockClientHttpRequest.java | @@ -48,9 +48,9 @@
*/
public class MockClientHttpRequest extends AbstractClientHttpRequest {
- private HttpMethod httpMethod;
+ private final HttpMethod httpMethod;
- private URI url;
+ private final URI url;
private final DataBufferFactory bufferFactory = new DefaultDataBufferFactory();
@@ -160,9 +160,7 @@... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/client/reactive/MockClientHttpResponse.java | @@ -134,9 +134,7 @@ public Mono<String> getBodyAsString() {
private static String dumpString(DataBuffer buffer, Charset charset) {
Assert.notNull(charset, "'charset' must not be null");
- byte[] bytes = new byte[buffer.readableByteCount()];
- buffer.read(bytes);
- return new String(bytes, charset);
+ return ... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpResponse.java | @@ -153,10 +153,9 @@ public Mono<String> getBodyAsString() {
private static String bufferToString(DataBuffer buffer, Charset charset) {
Assert.notNull(charset, "'charset' must not be null");
- byte[] bytes = new byte[buffer.readableByteCount()];
- buffer.read(bytes);
+ String s = buffer.toString(charset);
... | true |
Other | spring-projects | spring-framework | f17b0125ff8a93a996882915fdda4df85cba15f8.json | Simplify conversion of DataBuffer to String
See gh-24786 | spring-webflux/src/main/java/org/springframework/web/reactive/socket/WebSocketMessage.java | @@ -84,9 +84,7 @@ public String getPayloadAsText() {
* @since 5.0.5
*/
public String getPayloadAsText(Charset charset) {
- byte[] bytes = new byte[this.payload.readableByteCount()];
- this.payload.read(bytes);
- return new String(bytes, charset);
+ return this.payload.toString(charset);
}
/** | true |
Other | spring-projects | spring-framework | 072961b91ae03c998dc4aa27a87590e5d897fd12.json | Fix typo in BeanDefinitionParserDelegate | spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -90,7 +90,7 @@ public class BeanDefinitionPa... | false |
Other | spring-projects | spring-framework | 9fb614a5c60bf6f269edee6b69e543d8ca6af1c3.json | Clarify the role of views with Spring MVC
This commit adds a section to the reference docs that explains
views live within the trust boundary of the application, and the
security implications thereof.
Closes gh-24777 | src/docs/asciidoc/web/webmvc-view.adoc | @@ -7,8 +7,11 @@ Thymeleaf, Groovy Markup Templates, JSPs, or other technologies, is primarily a
of a configuration change. This chapter covers view technologies integrated with
Spring MVC. We assume you are already familiar with <<mvc-viewresolver>>.
-
-
+WARNING: The views of a Spring MVC application live within ... | false |
Other | spring-projects | spring-framework | 2209e7cb9201d2fa3fe265d98b4dd5dd2db462fc.json | Reuse empty class array constant in ClassUtils
Closes gh-24221 | spring-core/src/main/java/org/springframework/util/ClassUtils.java | @@ -65,6 +65,9 @@ public abstract class ClassUtils {
/** Prefix for internal non-primitive array class names: {@code "[L"}. */
private static final String NON_PRIMITIVE_ARRAY_PREFIX = "[L";
+ /** A reusable empty class array constant. */
+ private static final Class<?>[] EMPTY_CLASS_ARRAY = {};
+
/** The packag... | true |
Other | spring-projects | spring-framework | 2209e7cb9201d2fa3fe265d98b4dd5dd2db462fc.json | Reuse empty class array constant in ClassUtils
Closes gh-24221 | spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -232,16 +232,15 @@ private static EntityMana... | true |
Other | spring-projects | spring-framework | 1c6dda3ca4dc28beee98a4337985f9e4a12a8157.json | Improve performance of StringUtils#cleanPath | spring-core/src/main/java/org/springframework/util/StringUtils.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -701,6 +701,10 @@ else if (TOP_PATH.equals(e... | true |
Other | spring-projects | spring-framework | 1c6dda3ca4dc28beee98a4337985f9e4a12a8157.json | Improve performance of StringUtils#cleanPath | spring-core/src/test/java/org/springframework/util/StringUtilsTests.java | @@ -399,6 +399,7 @@ void cleanPath() {
assertThat(StringUtils.cleanPath("file:../")).isEqualTo("file:../");
assertThat(StringUtils.cleanPath("file:./../")).isEqualTo("file:../");
assertThat(StringUtils.cleanPath("file:.././")).isEqualTo("file:../");
+ assertThat(StringUtils.cleanPath("file:/mypath/spring.fact... | true |
Other | spring-projects | spring-framework | 946fc39d423da66833a2130256c68c834c7685ca.json | Add Javadoc since for Jaxb2XmlDecoder(MimeType...)
See gh-23353 | spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlDecoder.java | @@ -82,6 +82,11 @@ public Jaxb2XmlDecoder() {
super(MimeTypeUtils.APPLICATION_XML, MimeTypeUtils.TEXT_XML);
}
+ /**
+ * Create a {@code Jaxb2XmlDecoder} with the specified MIME types.
+ * @param supportedMimeTypes supported MIME types
+ * @since 5.1.9
+ */
public Jaxb2XmlDecoder(MimeType... supportedMimeTy... | false |
Other | spring-projects | spring-framework | be4facef1b663849e9be33fb62a3cb444ae0d918.json | Relax check on default data MimeType
If there is more than one non-basic codec (e.g. CBOR and JSON)
RSocketRequester.Builder takes the mime type of the first one rather
than giving up. It is a valid scenario (JSON for server responding to
browser, and CBOR for client talking to server) and it is the default
situation ... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilder.java | @@ -145,21 +145,14 @@ private MimeType getDataMimeType(RSocketStrategies strategies) {
if (this.dataMimeType != null) {
return this.dataMimeType;
}
- // Look for non-basic Decoder (e.g. CBOR, Protobuf)
- MimeType selected = null;
- List<Decoder<?>> decoders = strategies.decoders();
- for (Decoder<?> candi... | true |
Other | spring-projects | spring-framework | be4facef1b663849e9be33fb62a3cb444ae0d918.json | Relax check on default data MimeType
If there is more than one non-basic codec (e.g. CBOR and JSON)
RSocketRequester.Builder takes the mime type of the first one rather
than giving up. It is a valid scenario (JSON for server responding to
browser, and CBOR for client talking to server) and it is the default
situation ... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketRequester.java | @@ -128,11 +128,10 @@ interface Builder {
/**
* Configure the payload data MimeType to specify on the {@code SETUP}
* frame that applies to the whole connection.
- * <p>If this is not set, the builder will try to select the mime type
- * based on the presence of a single
+ * <p>If this is not set, it w... | true |
Other | spring-projects | spring-framework | be4facef1b663849e9be33fb62a3cb444ae0d918.json | Relax check on default data MimeType
If there is more than one non-basic codec (e.g. CBOR and JSON)
RSocketRequester.Builder takes the mime type of the first one rather
than giving up. It is a valid scenario (JSON for server responding to
browser, and CBOR for client talking to server) and it is the default
situation ... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandler.java | @@ -304,7 +304,13 @@ protected void handleNoMatch(@Nullable RouteMatcher.Route destination, Message<?
*/
public SocketAcceptor serverResponder() {
return (setupPayload, sendingRSocket) -> {
- MessagingRSocket responder = createResponder(setupPayload, sendingRSocket);
+ MessagingRSocket responder;
+ try {
... | true |
Other | spring-projects | spring-framework | be4facef1b663849e9be33fb62a3cb444ae0d918.json | Relax check on default data MimeType
If there is more than one non-basic codec (e.g. CBOR and JSON)
RSocketRequester.Builder takes the mime type of the first one rather
than giving up. It is a valid scenario (JSON for server responding to
browser, and CBOR for client talking to server) and it is the default
situation ... | spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilderTests.java | @@ -46,7 +46,6 @@
import org.springframework.util.ReflectionUtils;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mock... | true |
Other | spring-projects | spring-framework | 88016d47d01c74157f638dc1217ee6aa2428c65f.json | Fix issues in RSocketMessageHandler initialization
This commit ensures getRSocketStrategies() now reflects the state of
corresponding RSocketMessageHandler properties even if those change
after a call to setRSocketStrategies.
RSocketMessageHandler has default Encoder/Decoder initializations
consistent with the recent... | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/reactive/MessageMappingMessageHandler.java | @@ -36,7 +36,11 @@
import org.springframework.context.EmbeddedValueResolverAware;
import org.springframework.core.KotlinDetector;
import org.springframework.core.annotation.AnnotatedElementUtils;
+import org.springframework.core.codec.ByteArrayDecoder;
+import org.springframework.core.codec.ByteBufferDecoder;
+impor... | true |
Other | spring-projects | spring-framework | 88016d47d01c74157f638dc1217ee6aa2428c65f.json | Fix issues in RSocketMessageHandler initialization
This commit ensures getRSocketStrategies() now reflects the state of
corresponding RSocketMessageHandler properties even if those change
after a call to setRSocketStrategies.
RSocketMessageHandler has default Encoder/Decoder initializations
consistent with the recent... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketStrategies.java | @@ -39,7 +39,6 @@
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.lang.Nullable;
import org.springframework.util.AntPathMatcher;
-import org.springframework.util.Assert;
import org.springframework.util.MimeTypeUtils;
import org.springframework.util.RouteMatcher;
import... | true |
Other | spring-projects | spring-framework | 88016d47d01c74157f638dc1217ee6aa2428c65f.json | Fix issues in RSocketMessageHandler initialization
This commit ensures getRSocketStrategies() now reflects the state of
corresponding RSocketMessageHandler properties even if those change
after a call to setRSocketStrategies.
RSocketMessageHandler has default Encoder/Decoder initializations
consistent with the recent... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketStrategies.java | @@ -181,7 +181,7 @@ interface Builder {
* efficiency consider using the {@code PathPatternRouteMatcher} from
* {@code spring-web} instead.
*/
- Builder routeMatcher(RouteMatcher routeMatcher);
+ Builder routeMatcher(@Nullable RouteMatcher routeMatcher);
/**
* Configure a {@link MetadataExtractor}... | true |
Other | spring-projects | spring-framework | 88016d47d01c74157f638dc1217ee6aa2428c65f.json | Fix issues in RSocketMessageHandler initialization
This commit ensures getRSocketStrategies() now reflects the state of
corresponding RSocketMessageHandler properties even if those change
after a call to setRSocketStrategies.
RSocketMessageHandler has default Encoder/Decoder initializations
consistent with the recent... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandler.java | @@ -32,6 +32,10 @@
import org.springframework.beans.BeanUtils;
import org.springframework.core.ReactiveAdapterRegistry;
import org.springframework.core.annotation.AnnotatedElementUtils;
+import org.springframework.core.codec.ByteArrayEncoder;
+import org.springframework.core.codec.ByteBufferEncoder;
+import org.spri... | true |
Other | spring-projects | spring-framework | 88016d47d01c74157f638dc1217ee6aa2428c65f.json | Fix issues in RSocketMessageHandler initialization
This commit ensures getRSocketStrategies() now reflects the state of
corresponding RSocketMessageHandler properties even if those change
after a call to setRSocketStrategies.
RSocketMessageHandler has default Encoder/Decoder initializations
consistent with the recent... | spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultRSocketStrategiesTests.java | @@ -0,0 +1,102 @@
+/*
+ * Copyright 2002-2019 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
... | true |
Other | spring-projects | spring-framework | 88016d47d01c74157f638dc1217ee6aa2428c65f.json | Fix issues in RSocketMessageHandler initialization
This commit ensures getRSocketStrategies() now reflects the state of
corresponding RSocketMessageHandler properties even if those change
after a call to setRSocketStrategies.
RSocketMessageHandler has default Encoder/Decoder initializations
consistent with the recent... | spring-messaging/src/test/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandlerTests.java | @@ -16,18 +16,28 @@
package org.springframework.messaging.rsocket.annotation.support;
import java.util.Collections;
+import java.util.List;
import java.util.Map;
import io.rsocket.frame.FrameType;
import org.junit.Test;
+import org.springframework.core.ReactiveAdapterRegistry;
+import org.springframework.cor... | true |
Other | spring-projects | spring-framework | c456950bc3d2611e34154afc87193b3cc9e1f7a8.json | Add create shortcut to RSocketStrategies
Now that RSocketStrategies has default settings it makes sense to have
a create() shortcut vs builder().build().
This commit also updates tests to take advantage of improvements in this
and the previous two commits.
See gh-23314 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketStrategies.java | @@ -114,20 +114,30 @@ default <T> Decoder<T> decoder(ResolvableType elementType, @Nullable MimeType mi
*/
ReactiveAdapterRegistry reactiveAdapterRegistry();
+ /**
+ * Return a builder to create a new {@link RSocketStrategies} instance
+ * replicated from the current instance.
+ */
+ default Builder mutate() {... | true |
Other | spring-projects | spring-framework | c456950bc3d2611e34154afc87193b3cc9e1f7a8.json | Add create shortcut to RSocketStrategies
Now that RSocketStrategies has default settings it makes sense to have
a create() shortcut vs builder().build().
This commit also updates tests to take advantage of improvements in this
and the previous two commits.
See gh-23314 | spring-messaging/src/test/java/org/springframework/messaging/rsocket/RSocketBufferLeakTests.java | @@ -26,6 +26,7 @@
import io.rsocket.AbstractRSocket;
import io.rsocket.RSocket;
import io.rsocket.RSocketFactory;
+import io.rsocket.SocketAcceptor;
import io.rsocket.frame.decoder.PayloadDecoder;
import io.rsocket.plugins.RSocketInterceptor;
import io.rsocket.transport.netty.server.CloseableChannel;
@@ -44,8 +45... | true |
Other | spring-projects | spring-framework | c456950bc3d2611e34154afc87193b3cc9e1f7a8.json | Add create shortcut to RSocketStrategies
Now that RSocketStrategies has default settings it makes sense to have
a create() shortcut vs builder().build().
This commit also updates tests to take advantage of improvements in this
and the previous two commits.
See gh-23314 | spring-messaging/src/test/java/org/springframework/messaging/rsocket/RSocketClientToServerIntegrationTests.java | @@ -18,8 +18,8 @@
import java.time.Duration;
-import io.netty.buffer.PooledByteBufAllocator;
import io.rsocket.RSocketFactory;
+import io.rsocket.SocketAcceptor;
import io.rsocket.frame.decoder.PayloadDecoder;
import io.rsocket.transport.netty.server.CloseableChannel;
import io.rsocket.transport.netty.server.T... | true |
Other | spring-projects | spring-framework | c456950bc3d2611e34154afc87193b3cc9e1f7a8.json | Add create shortcut to RSocketStrategies
Now that RSocketStrategies has default settings it makes sense to have
a create() shortcut vs builder().build().
This commit also updates tests to take advantage of improvements in this
and the previous two commits.
See gh-23314 | spring-messaging/src/test/java/org/springframework/messaging/rsocket/RSocketServerToClientIntegrationTests.java | @@ -18,8 +18,8 @@
import java.time.Duration;
-import io.netty.buffer.PooledByteBufAllocator;
import io.rsocket.RSocketFactory;
+import io.rsocket.SocketAcceptor;
import io.rsocket.frame.decoder.PayloadDecoder;
import io.rsocket.transport.netty.server.CloseableChannel;
import io.rsocket.transport.netty.server.T... | true |
Other | spring-projects | spring-framework | 91b040d0bf05c857c022a263b3c076a3020c3875.json | Add responder strategies to RSocketStrategies
RouteMatcher and MetadataExtractor can now be configured on and
accessed through RSocketStrategies. This simplifies configuration for
client and server responders.
See gh-23314 | spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/reactive/MessageMappingMessageHandler.java | @@ -88,6 +88,7 @@ public class MessageMappingMessageHandler extends AbstractMethodMessageHandler<C
@Nullable
private Validator validator;
+ @Nullable
private RouteMatcher routeMatcher;
private ConversionService conversionService = new DefaultFormattingConversionService();
@@ -97,9 +98,6 @@ public class Mess... | true |
Other | spring-projects | spring-framework | 91b040d0bf05c857c022a263b3c076a3020c3875.json | Add responder strategies to RSocketStrategies
RouteMatcher and MetadataExtractor can now be configured on and
accessed through RSocketStrategies. This simplifies configuration for
client and server responders.
See gh-23314 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketStrategies.java | @@ -38,7 +38,11 @@
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.lang.Nullable;
+import org.springframework.util.AntPathMatcher;
import org.springframework.util.Assert;
+import org.springframework.util.MimeTy... | true |
Other | spring-projects | spring-framework | 91b040d0bf05c857c022a263b3c076a3020c3875.json | Add responder strategies to RSocketStrategies
RouteMatcher and MetadataExtractor can now be configured on and
accessed through RSocketStrategies. This simplifies configuration for
client and server responders.
See gh-23314 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketStrategies.java | @@ -31,7 +31,10 @@
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.lang.Nullable;
+import org.springframework.util.AntPathMatcher;
import org.springframework.util.MimeType;
+import org.springframework.ut... | true |
Other | spring-projects | spring-framework | 91b040d0bf05c857c022a263b3c076a3020c3875.json | Add responder strategies to RSocketStrategies
RouteMatcher and MetadataExtractor can now be configured on and
accessed through RSocketStrategies. This simplifies configuration for
client and server responders.
See gh-23314 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/AnnotationClientResponderConfigurer.java | @@ -25,10 +25,8 @@
import org.springframework.beans.BeanUtils;
import org.springframework.lang.Nullable;
import org.springframework.messaging.rsocket.ClientRSocketFactoryConfigurer;
-import org.springframework.messaging.rsocket.MetadataExtractor;
import org.springframework.messaging.rsocket.RSocketStrategies;
impo... | true |
Other | spring-projects | spring-framework | 91b040d0bf05c857c022a263b3c076a3020c3875.json | Add responder strategies to RSocketStrategies
RouteMatcher and MetadataExtractor can now be configured on and
accessed through RSocketStrategies. This simplifies configuration for
client and server responders.
See gh-23314 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandler.java | @@ -114,10 +114,16 @@ public List<? extends Encoder<?>> getEncoders() {
/**
* Provide configuration in the form of {@link RSocketStrategies} instance
* which can also be re-used to initialize a client-side
- * {@link RSocketRequester}. When this property is set, it also sets
- * {@link #setDecoders(List) deco... | true |
Other | spring-projects | spring-framework | c3c152f80636d91090be899f66cc033796fa777f.json | Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.
This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefi... | spring-test/src/main/java/org/springframework/test/context/jdbc/MergedSqlConfig.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,15 @@
package org.springframew... | true |
Other | spring-projects | spring-framework | c3c152f80636d91090be899f66cc033796fa777f.json | Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.
This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefi... | spring-test/src/main/java/org/springframework/test/context/jdbc/SqlConfig.java | @@ -42,16 +42,17 @@
* is unfortunately not possible to assign a value of {@code null} to an annotation
* attribute. Thus, in order to support overrides of <em>inherited</em> global
* configuration, {@code @SqlConfig} attributes have an <em>explicit</em>
- * {@code default} value of either {@code ""} for Strings o... | true |
Other | spring-projects | spring-framework | c3c152f80636d91090be899f66cc033796fa777f.json | Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.
This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefi... | spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java | @@ -267,7 +267,7 @@ private ResourceDatabasePopulator createDatabasePopulator(MergedSqlConfig merged
ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
populator.setSqlScriptEncoding(mergedSqlConfig.getEncoding());
populator.setSeparator(mergedSqlConfig.getSeparator());
- populator.setComm... | true |
Other | spring-projects | spring-framework | c3c152f80636d91090be899f66cc033796fa777f.json | Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.
This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefi... | spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/SqlConfigTestInterface.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,6 @@
*/
@ContextConfiguration(c... | true |
Other | spring-projects | spring-framework | c3c152f80636d91090be899f66cc033796fa777f.json | Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.
This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefi... | spring-test/src/test/java/org/springframework/test/context/jdbc/CustomScriptSyntaxSqlScriptsTests.java | @@ -38,7 +38,7 @@ public class CustomScriptSyntaxSqlScriptsTests extends AbstractTransactionalJUni
@Test
@Sql("schema.sql")
@Sql(scripts = "data-add-users-with-custom-script-syntax.sql",//
- config = @SqlConfig(commentPrefix = "`", blockCommentStartDelimiter = "#$", blockCommentEndDelimiter = "$#", separator = "@... | true |
Other | spring-projects | spring-framework | c3c152f80636d91090be899f66cc033796fa777f.json | Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.
This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefi... | spring-test/src/test/java/org/springframework/test/context/jdbc/GlobalCustomScriptSyntaxSqlScriptsTests.java | @@ -33,7 +33,7 @@
*/
@ContextConfiguration(classes = EmptyDatabaseConfig.class)
@DirtiesContext
-@SqlConfig(commentPrefix = "`", blockCommentStartDelimiter = "#$", blockCommentEndDelimiter = "$#", separator = "@@")
+@SqlConfig(commentPrefixes = { "`", "%%" }, blockCommentStartDelimiter = "#$", blockCommentEndDelimi... | true |
Other | spring-projects | spring-framework | c3c152f80636d91090be899f66cc033796fa777f.json | Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.
This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefi... | spring-test/src/test/java/org/springframework/test/context/jdbc/MergedSqlConfigTests.java | @@ -21,9 +21,11 @@
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
+import static org.assertj.core.api.SoftAssertions.assertSoftly;
import static org.springframework.jdbc.datasource.init.ScriptUtils.... | true |
Other | spring-projects | spring-framework | c3c152f80636d91090be899f66cc033796fa777f.json | Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.
This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefi... | spring-test/src/test/resources/org/springframework/test/context/jdbc/data-add-users-with-custom-script-syntax.sql | @@ -19,4 +19,7 @@ VALUES('Dilbert')
INSERT INTO user VALUES('Dogbert')@@
+
+%% another custom single-line comment
+
INSERT INTO user VALUES('Catbert')@@ | true |
Other | spring-projects | spring-framework | c3c152f80636d91090be899f66cc033796fa777f.json | Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.
This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefi... | src/docs/asciidoc/testing.adoc | @@ -4190,12 +4190,12 @@ documented in the javadoc of the corresponding attribute. Due to the rules defin
annotation attributes in the Java Language Specification, it is, unfortunately, not
possible to assign a value of `null` to an annotation attribute. Thus, in order to
support overrides of inherited global configu... | true |
Other | spring-projects | spring-framework | 78802d4277a68c2eb5b742840cfc31d0848c0efc.json | Fix typo in webflux.adoc | src/docs/asciidoc/web/webflux.adoc | @@ -830,7 +830,7 @@ while a fully formatted prefix based on that ID is available from
`DEBUG` and `TRACE` logging can log sensitive information. This is why form parameters and
headers are masked by default and you must explicitly enable their logging in full.
-The followig example shows how to do so for server-sid... | false |
Other | spring-projects | spring-framework | acb3d1cf888125d7663628e766a42adaee8e78df.json | Fix typo in test from previous commit
See gh-23310 | spring-web/src/test/java/org/springframework/web/util/pattern/PathPatternParserTests.java | @@ -411,7 +411,7 @@ public void compareTests() {
@Test
public void separatorTests() {
PathPatternParser parser = new PathPatternParser();
- parser.setPathOptions(PathContainer.Options.HTTP_PATH);
+ parser.setPathOptions(PathContainer.Options.create('.', false));
String rawPattern = "first.second.{last}";
... | false |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/main/java/org/springframework/http/server/DefaultPathContainer.java | @@ -20,7 +20,9 @@
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.lang.Nullable;
@@ -38,11 +40,16 @@
*/
final class Defau... | true |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/main/java/org/springframework/http/server/PathContainer.java | @@ -72,19 +72,19 @@ default PathContainer subPath(int startIndex, int endIndex) {
* @return the parsed path
*/
static PathContainer parsePath(String path) {
- return DefaultPathContainer.createFromUrlPath(path, "/");
+ return DefaultPathContainer.createFromUrlPath(path, Options.HTTP_PATH);
}
/**
* Pa... | true |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/main/java/org/springframework/web/util/pattern/InternalPathPatternParser.java | @@ -105,16 +105,17 @@ public PathPattern parse(String pathPattern) throws PatternParseException {
while (this.pos < this.pathPatternLength) {
char ch = this.pathPatternData[this.pos];
- if (ch == this.parser.getSeparator()) {
+ char separator = this.parser.getPathOptions().separator();
+ if (ch == separa... | true |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java | @@ -100,8 +100,8 @@ public class PathPattern implements Comparable<PathPattern> {
/** The parser used to construct this pattern. */
private final PathPatternParser parser;
- /** The separator used when parsing the pattern. */
- private final char separator;
+ /** The options to use to parse a pattern. */
+ privat... | true |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/main/java/org/springframework/web/util/pattern/PathPatternParser.java | @@ -16,6 +16,8 @@
package org.springframework.web.util.pattern;
+import org.springframework.http.server.PathContainer;
+
/**
* Parser for URI path patterns producing {@link PathPattern} instances that can
* then be matched to requests.
@@ -36,7 +38,7 @@ public class PathPatternParser {
private boolean cas... | true |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/main/java/org/springframework/web/util/pattern/PathPatternRouteMatcher.java | @@ -37,21 +37,32 @@ public class PathPatternRouteMatcher implements RouteMatcher {
private final PathPatternParser parser;
- private final String separator;
-
private final Map<String, PathPattern> pathPatternCache = new ConcurrentHashMap<>();
+ /**
+ * Default constructor with {@link PathPatternParser} cu... | true |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/test/java/org/springframework/http/server/DefaultPathContainerTests.java | @@ -27,7 +27,6 @@
import org.springframework.util.MultiValueMap;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Unit tests for {@link DefaultPathContainer}.
@@ -36,7 +35,7 @@
public class DefaultPathContainerTe... | true |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/test/java/org/springframework/web/util/pattern/PathPatternParserTests.java | @@ -411,7 +411,7 @@ public void compareTests() {
@Test
public void separatorTests() {
PathPatternParser parser = new PathPatternParser();
- parser.setSeparator('.');
+ parser.setPathOptions(PathContainer.Options.HTTP_PATH);
String rawPattern = "first.second.{last}";
PathPattern pattern = parser.parse(raw... | true |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/test/java/org/springframework/web/util/pattern/PathPatternRouteMatcherTests.java | @@ -16,8 +16,11 @@
package org.springframework.web.util.pattern;
+import java.util.Map;
+
import org.junit.Test;
+import org.springframework.http.server.PathContainer;
import org.springframework.util.RouteMatcher;
import static org.assertj.core.api.Assertions.assertThat;
@@ -32,18 +35,33 @@ public class Pat... | true |
Other | spring-projects | spring-framework | 358a6d6f10d800cd52cf10a90c08d2786e1b9875.json | Improve separator support in PathContainer
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer... | spring-web/src/test/java/org/springframework/web/util/pattern/PathPatternTests.java | @@ -710,9 +710,10 @@ public void extractPathWithinPattern() throws Exception {
@Test
public void extractPathWithinPatternCustomSeparator() {
PathPatternParser ppp = new PathPatternParser();
- ppp.setSeparator('.');
+ ppp.setPathOptions(PathContainer.Options.create('.', true));
PathPattern pp = ppp.parse("te... | true |
Other | spring-projects | spring-framework | 69214429df2ec644da6eb121edf6e323ee16eaea.json | Ensure aggregateTestReports task is UP-TO-DATE
Prior to this commit, the standard Gradle `test` task was configured to
execute all JUnit tests and had a dependency on the `testNG` task. In
addition, the `aggregateTestReports` task depended on the results of
the `test` and `testNG` tasks as input. Consequently, a subse... | spring-test/spring-test.gradle | @@ -85,6 +85,17 @@ dependencies {
testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0.1")
}
+task junit(type: Test) {
+ description = "Runs JUnit 4 and JUnit Jupiter tests."
+ useJUnitPlatform {
+ excludeTags "failing-test-case"
+ }
+ include(["**/*Tests.class", "**/*Test.class"])
+ exclude(["**/testng/**/*.*"])
+ // J... | false |
Other | spring-projects | spring-framework | 2b94205ba94f4e901efd7dece82da543d71c0573.json | Update docs on multipart with RestTemplate
Replace docs on using MultipartBodyBuilder for the RestTemplate with
examples that show MultiValueMap. Originally the idea was to make
MultipartBodyBuilder accessible to the RestTemplate too, but with
support for async parts that's no longer a good fit.
Closes gh-23295 | spring-web/src/main/java/org/springframework/web/client/RestOperations.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -153,8 +153,7 @@ <T> ResponseEntity<T> getFo... | true |
Other | spring-projects | spring-framework | 2b94205ba94f4e901efd7dece82da543d71c0573.json | Update docs on multipart with RestTemplate
Replace docs on using MultipartBodyBuilder for the RestTemplate with
examples that show MultiValueMap. Originally the idea was to make
MultipartBodyBuilder accessible to the RestTemplate too, but with
support for async parts that's no longer a good fit.
Closes gh-23295 | src/docs/asciidoc/integration.adoc | @@ -1277,45 +1277,46 @@ to serialize only a subset of the object properties, as the following example sh
[[rest-template-multipart]]
===== Multipart
-To send multipart data, you need to provide a `MultiValueMap<String, ?>` whose values are
-either `Object` instances that represent part content or `HttpEntity` insta... | true |
Other | spring-projects | spring-framework | 38f6d270f8691b8026c3197a111cfede6a01379f.json | Delete dead code in tests | spring-web/src/test/java/org/springframework/web/filter/OncePerRequestFilterTests.java | @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.web.filter;
import java.io.IOException;
@@ -33,9 +34,9 @@
import static org.assertj.core.api.Assertions.assertThat;
-
/**
* Unit tests for {@link On... | true |
Other | spring-projects | spring-framework | 38f6d270f8691b8026c3197a111cfede6a01379f.json | Delete dead code in tests | spring-websocket/src/test/java/org/springframework/web/socket/server/support/WebSocketHttpRequestHandlerTests.java | @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.web.socket.server.support;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import javax.servlet.ServletException;
-im... | true |
Other | spring-projects | spring-framework | 1e9ccdd8b8756162ed635b45c077e45b6ae33504.json | Pass RSocketStrategies to MetadataExtractor
Simplify the creation of MetadataExtractor by not requiring
RSocketStrategies up front. The strategies are already configured in higher
level places like RSocketMessageHandler that invoke the MetadataExtractor.
The strategies are now passed in as an argument to the extract m... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultMetadataExtractor.java | @@ -31,7 +31,6 @@
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.lang.Nullable;
-import org.springframework.util.Assert;
import org.springframework.util.MimeType;
/**
@@ -48,17 +47,13 @@
*/
public class ... | true |
Other | spring-projects | spring-framework | 1e9ccdd8b8756162ed635b45c077e45b6ae33504.json | Pass RSocketStrategies to MetadataExtractor
Simplify the creation of MetadataExtractor by not requiring
RSocketStrategies up front. The strategies are already configured in higher
level places like RSocketMessageHandler that invoke the MetadataExtractor.
The strategies are now passed in as an argument to the extract m... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataExtractor.java | @@ -58,8 +58,9 @@ public interface MetadataExtractor {
* @param payload the payload whose metadata should be read
* @param metadataMimeType the mime type of the metadata; this is what was
* specified by the client at the start of the RSocket connection.
+ * @param strategies for access to codecs and a DataBuf... | true |
Other | spring-projects | spring-framework | 1e9ccdd8b8756162ed635b45c077e45b6ae33504.json | Pass RSocketStrategies to MetadataExtractor
Simplify the creation of MetadataExtractor by not requiring
RSocketStrategies up front. The strategies are already configured in higher
level places like RSocketMessageHandler that invoke the MetadataExtractor.
The strategies are now passed in as an argument to the extract m... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/MessagingRSocket.java | @@ -31,7 +31,6 @@
import reactor.core.publisher.MonoProcessor;
import org.springframework.core.io.buffer.DataBuffer;
-import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.core.io.buffer.NettyDataBuffer;
import org.sprin... | true |
Other | spring-projects | spring-framework | 1e9ccdd8b8756162ed635b45c077e45b6ae33504.json | Pass RSocketStrategies to MetadataExtractor
Simplify the creation of MetadataExtractor by not requiring
RSocketStrategies up front. The strategies are already configured in higher
level places like RSocketMessageHandler that invoke the MetadataExtractor.
The strategies are now passed in as an argument to the extract m... | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandler.java | @@ -208,7 +208,7 @@ public void afterPropertiesSet() {
.build();
}
if (this.metadataExtractor == null) {
- DefaultMetadataExtractor extractor = new DefaultMetadataExtractor(this.rsocketStrategies);
+ DefaultMetadataExtractor extractor = new DefaultMetadataExtractor();
extractor.metadataToExtract(Mim... | true |
Other | spring-projects | spring-framework | 1e9ccdd8b8756162ed635b45c077e45b6ae33504.json | Pass RSocketStrategies to MetadataExtractor
Simplify the creation of MetadataExtractor by not requiring
RSocketStrategies up front. The strategies are already configured in higher
level places like RSocketMessageHandler that invoke the MetadataExtractor.
The strategies are now passed in as an argument to the extract m... | spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultMetadataExtractorTests.java | @@ -70,7 +70,7 @@ public void setUp() {
this.captor = ArgumentCaptor.forClass(Payload.class);
BDDMockito.when(this.rsocket.fireAndForget(captor.capture())).thenReturn(Mono.empty());
- this.extractor = new DefaultMetadataExtractor(this.strategies);
+ this.extractor = new DefaultMetadataExtractor();
}
@Af... | true |
Other | spring-projects | spring-framework | d33e4878a0dad8745925188c5334f45076a0ea3b.json | Move MetadataExtractor to the rsocket package
The move up the hierarchy reflects the fact that MetadataExtractor
is more generally useful and not tied to annotations. | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultMetadataExtractor.java | @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.messaging.rsocket.annotation.support;
+package org.springframework.messaging.rsocket;
import java.util.Collections;
import java.util.HashMap;
@@ -31,7 +31,6 ... | true |
Other | spring-projects | spring-framework | d33e4878a0dad8745925188c5334f45076a0ea3b.json | Move MetadataExtractor to the rsocket package
The move up the hierarchy reflects the fact that MetadataExtractor
is more generally useful and not tied to annotations. | spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataExtractor.java | @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.messaging.rsocket.annotation.support;
+package org.springframework.messaging.rsocket;
import java.util.Map;
@@ -38,6 +38,16 @@ public interface MetadataExtr... | true |
Other | spring-projects | spring-framework | d33e4878a0dad8745925188c5334f45076a0ea3b.json | Move MetadataExtractor to the rsocket package
The move up the hierarchy reflects the fact that MetadataExtractor
is more generally useful and not tied to annotations. | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/ClientResponderFactory.java | @@ -22,6 +22,7 @@
import org.springframework.messaging.handler.invocation.reactive.ArgumentResolverConfigurer;
import org.springframework.messaging.handler.invocation.reactive.ReturnValueHandlerConfigurer;
+import org.springframework.messaging.rsocket.MetadataExtractor;
import org.springframework.messaging.rsocket... | true |
Other | spring-projects | spring-framework | d33e4878a0dad8745925188c5334f45076a0ea3b.json | Move MetadataExtractor to the rsocket package
The move up the hierarchy reflects the fact that MetadataExtractor
is more generally useful and not tied to annotations. | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/DefaultClientResponderFactory.java | @@ -24,6 +24,7 @@
import org.springframework.lang.Nullable;
import org.springframework.messaging.handler.invocation.reactive.ArgumentResolverConfigurer;
import org.springframework.messaging.handler.invocation.reactive.ReturnValueHandlerConfigurer;
+import org.springframework.messaging.rsocket.MetadataExtractor;
imp... | true |
Other | spring-projects | spring-framework | d33e4878a0dad8745925188c5334f45076a0ea3b.json | Move MetadataExtractor to the rsocket package
The move up the hierarchy reflects the fact that MetadataExtractor
is more generally useful and not tied to annotations. | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/MessagingRSocket.java | @@ -40,6 +40,7 @@
import org.springframework.messaging.ReactiveMessageHandler;
import org.springframework.messaging.handler.DestinationPatternsMessageCondition;
import org.springframework.messaging.handler.invocation.reactive.HandlerMethodReturnValueHandler;
+import org.springframework.messaging.rsocket.MetadataExtr... | true |
Other | spring-projects | spring-framework | d33e4878a0dad8745925188c5334f45076a0ea3b.json | Move MetadataExtractor to the rsocket package
The move up the hierarchy reflects the fact that MetadataExtractor
is more generally useful and not tied to annotations. | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketMessageHandler.java | @@ -40,6 +40,8 @@
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.reactive.MessageMappingMessageHandler;
import org.springframework.messaging.handler.invocation.reactive.HandlerMethodReturnValueHandler;
+import org.springframework.messag... | true |
Other | spring-projects | spring-framework | d33e4878a0dad8745925188c5334f45076a0ea3b.json | Move MetadataExtractor to the rsocket package
The move up the hierarchy reflects the fact that MetadataExtractor
is more generally useful and not tied to annotations. | spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultMetadataExtractorTests.java | @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.springframework.messaging.rsocket.annotation.support;
+package org.springframework.messaging.rsocket;
import java.time.Duration;
import java.util.Map;
@@ -31,16 +31,13 @@
i... | true |
Other | spring-projects | spring-framework | 2fd39839f83e8923277cb89bcff0b5dc5a18abfc.json | Improve toString() for synthesized annotations
Although the initial report in gh-28015 only covered inconsistencies
for arrays and strings in the toString() implementations for
annotations between the JDK (after Java 9) and Spring, it has since
come to our attention that there was further room for improvement.
This c... | spring-core/src/main/java/org/springframework/core/annotation/SynthesizedMergedAnnotationInvocationHandler.java | @@ -194,10 +194,38 @@ private String annotationToString() {
return string;
}
+ /**
+ * This method currently does not address the following issues which we may
+ * choose to address at a later point in time.
+ *
+ * <ul>
+ * <li>non-ASCII, non-visible, and non-printable characters within a character
+ * or... | true |
Other | spring-projects | spring-framework | 2fd39839f83e8923277cb89bcff0b5dc5a18abfc.json | Improve toString() for synthesized annotations
Although the initial report in gh-28015 only covered inconsistencies
for arrays and strings in the toString() implementations for
annotations between the JDK (after Java 9) and Spring, it has since
come to our attention that there was further room for improvement.
This c... | spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java | @@ -1887,22 +1887,44 @@ private void assertToStringForWebMappingWithPathAndValue(RequestMapping webMappi
// Formatting common to Spring and JDK 9+
assertThat(string)
- .contains("value={\"/test\"}", "path={\"/test\"}", "name=\"bar\"")
+ .contains("value={\"/test\"}", "path={\"/test\"}", "name=\"bar\"", "ch=... | true |
Other | spring-projects | spring-framework | b3ceb0f625a5b40d1007bb4dfe673be497fc2c9e.json | Add core JavaPoet utilities
This commit adds utilities that facilitate code generation patterns
used by the AOT engine.
Closes gh-28028 | spring-core/src/main/java/org/springframework/javapoet/support/CodeSnippet.java | @@ -0,0 +1,188 @@
+/*
+ * Copyright 2002-2022 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
... | true |
Other | spring-projects | spring-framework | b3ceb0f625a5b40d1007bb4dfe673be497fc2c9e.json | Add core JavaPoet utilities
This commit adds utilities that facilitate code generation patterns
used by the AOT engine.
Closes gh-28028 | spring-core/src/main/java/org/springframework/javapoet/support/MultiCodeBlock.java | @@ -0,0 +1,82 @@
+/*
+ * Copyright 2002-2022 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | b3ceb0f625a5b40d1007bb4dfe673be497fc2c9e.json | Add core JavaPoet utilities
This commit adds utilities that facilitate code generation patterns
used by the AOT engine.
Closes gh-28028 | spring-core/src/main/java/org/springframework/javapoet/support/MultiStatement.java | @@ -0,0 +1,194 @@
+/*
+ * Copyright 2002-2022 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
... | true |
Other | spring-projects | spring-framework | b3ceb0f625a5b40d1007bb4dfe673be497fc2c9e.json | Add core JavaPoet utilities
This commit adds utilities that facilitate code generation patterns
used by the AOT engine.
Closes gh-28028 | spring-core/src/main/java/org/springframework/javapoet/support/package-info.java | @@ -0,0 +1,9 @@
+/**
+ * Support classes for JavaPoet usage.
+ */
+@NonNullApi
+@NonNullFields
+package org.springframework.javapoet.support;
+
+import org.springframework.lang.NonNullApi;
+import org.springframework.lang.NonNullFields; | true |
Other | spring-projects | spring-framework | b3ceb0f625a5b40d1007bb4dfe673be497fc2c9e.json | Add core JavaPoet utilities
This commit adds utilities that facilitate code generation patterns
used by the AOT engine.
Closes gh-28028 | spring-core/src/test/java/org/springframework/javapoet/support/CodeSnippetTests.java | @@ -0,0 +1,75 @@
+/*
+ * Copyright 2002-2022 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.