forked from spring-projects/spring-framework
-
Couldn't load subscription status.
- Fork 0
merge from base #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issue: SPR-15515
Issue: SPR-15515
This commit introduces 2 new @nullable and @NonNullApi annotations that leverage JSR 305 (dormant but available via Findbugs jsr305 dependency and already used by libraries like OkHttp) meta-annotations to specify explicitly null-safety of Spring Framework parameters and return values. In order to avoid adding too much annotations, the default is set at package level with @NonNullApi and @nullable annotations are added when needed at parameter or return value level. These annotations are intended to be used on Spring Framework itself but also by other Spring projects. @nullable annotations have been introduced based on Javadoc and search of patterns like "return null;". It is expected that nullability of Spring Framework API will be polished with complementary commits. In practice, this will make the whole Spring Framework API null-safe for Kotlin projects (when KT-10942 will be fixed) since Kotlin will be able to leverage these annotations to know if a parameter or a return value is nullable or not. But this is also useful for Java developers as well since IntelliJ IDEA, for example, also understands these annotations to generate warnings when unsafe nullable usages are detected. Issue: SPR-15540
Correct the javadoc for ExchangeResult.getUrl()
Essentially drop "Configurer" suffix from nested interfaces.
Simplify the internals of the DefaultCodecs implementation favoring explicit fields per override vs a generic list of readers and writers for overrides.
MultipartHttpMessageWriter is now configured to handle JSON and XML out of the box.
This commit copies the MockServerRequest to the spring-test module, in the mock.web.reactive.function.server package. Issue: SPR-15530
This commit introduces ExtractingResponseErrorHandler: an alternative ResponseErrorHandler that uses `HttpMessageConverter`s to convert HTTP error responses to `RestClientException`. Issue: SPR-15544
Issue: SPR-15522
Provide a mechanism to override the configured send and receive
timeouts in the GenericMessagingTemplate.
- overload `doReceive()` to take a receive timeout argument
- for `sendAndReceive()` methods examine message headers for these
timeout values
- remove headers to avoid propagation
- avoid the unconditional rebuild of the reply message if the
original headers weren't present
- also remove headers from simple `send()` operations
- change javadocs for the setters to indicate they are now defaults
- add properties to allow the user to override the header names used
- change `TemporaryReplyChannel` to use `send` arg and change to static
- add package-protected ctor to avoid the compiler creating a
synthetic constructor for access
Issue: SPR-15591
This commit replaces the UnaryOperatory<ServerWebExchange> inputs with Function<ServerWebExchange, ServerWebExchange> instead. Unfortunately the composability methods inherited from Function don't work in terms of generics for composing multiple UnaryOperator's. Issue: SPR-15599
This commit makes Spring @nullable annotation leveraging JSR 305 @TypeQualifierNickname + @nonnull(when= When.MAYBE) instead of directly using @javax.annotation.Nullable which seems not designed to be used as a meta-annotation. It also removes @TypeQualifierDefault since the purpose of this annotation when applied at method level is to only change return value nullability, not parameters one. Issue: SPR-15540
Issue: SPR-15540
Issue: SPR-15540
The change to "optimize" the template by not rebuilding the reply message when the original header channels was null was incorrect. We need to null out those headers if they were originally null. Issue: SPR-15991
Issue: SPR-15540
Defining nullability of some API like EnvironmentCapable or ConditionContext causes issues in Spring Boot because in the context where they are used, it is known for sure they will return non-null values even if their API can in other context return null values. It is better in this case for both Java and Kotlin to not define at all the nullabity of such API. In practice, this is achieved by removing the package level @NonNullApi annotation and adding it only on the relevant classes. Issue: SPR-15540
Issue: SPR-15603
Issue: SPR-15602
This commit fixes the implementation of ExtractingResponseErrorHandler.hasError to allow for null values, indicating an override of the behavior inherited from DefaultResponseErrorHandler. Issue: SPR-15544
This commit introduces the Jackson2Tokenizer as a replacement for the JsonObjectDecoder. The latter was dropped because of its complexity, and hard dependency on Netty's ByteBuf. The new Jackson2Tokenizer leverages the new non-blocking JSON parser, using it to parse the incoming data buffers into TokenBuffers, each token buffer representing one JSON object. As with JsonObjectDecoder, it also supports streaming individual JSON array elements. Issue: SPR-14528
This commit changes the release of data buffers from a finally block into a `doFinally()` lambda on the returned `Flux<XMLEvent>` stream. Issue: SPR-15707
This commit introduces a `doFinally` block that properly signals the end of input for the non-blocking XML and JSON parsers.
Issue: SPR-15564
…ator Explicit typing for older jvm compilation in BodyExtractor
Issue: SPR-15718
Issue: SPR-15718
... and a couple more protected methods in WebFlux Issue: SPR-15718
Issue: SPR-15686
Issue: SPR-15709
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch. Issue: SPR-15720
Polish - the flag continueProcessing is not needed
This commit introduces a JUnit rule that detects ByteBuf leaks in subclasses of AbstractDataBufferAllocatingTestCase.
This commit introduces a cookies() method on ServerRequest, returning a MultiValueMap<String, HttpCookie>. Issue: SPR-15715
Issue: SPR-15721
Issue: SPR-15722
The new PathContainer represent the path as a series of elements including separators. This naturally represents leading/trailing slashes and empty path segments which in turn makes it easier to match in PathPattern as well as to reconstruct the path.
Direct comparison of a pattern (as a String) to the path does not make much sense now that we deal with URL encoding through PathContainer which exposes (safely) decoded path segments. Removing the PathPatternComparator also means we can keep patterns pre-sorted instead of sorting them all the time. That probably offsets any benefits from comparing to the lookup path for direct matches and patterns are still sorted according to specificity.
Follow-up change to the previous commit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.