This commit introduces tests for the status quo as of Spring Framework
5.1.x (before the introduction of the MergedAnnotations API in 5.2).
Specifically, this commit introduces tests for the following use cases.
- declared annotation type cannot be loaded
- class referenced via annotation attribute cannot be loaded
- nested annotation referenced via annotation attribute cannot be loaded
- enum referenced via annotation attribute cannot be loaded
The first two use cases above are also tested with merged annotation
support for a custom composed annotation.
Note: this commit does not include tests for annotation attribute
arrays of classes, annotations, or enums.
See gh-27772
Prior to this commit, a Profiles instance created via Profiles.of() was
not considered equivalent to another Profiles instance created via
Profiles.of() with the exact same expressions. This makes it difficult
to mock invocations of Environment#acceptsProfiles(Profiles) -- for
example, when using a mocking library such as Mockito.
This commit makes Profiles instances created via Profiles.of()
"comparable" by implementing equals() and hashCode() in ParsedProfiles.
Note, however, that equivalence is only guaranteed if the exact same
profile expression strings are supplied to Profiles.of(). In other
words, Profiles.of("A & B", "C | D") is equivalent to
Profiles.of("A & B", "C | D") and Profiles.of("C | D", "A & B"), but
Profiles.of("X & Y") is not equivalent to Profiles.of("X&Y") or
Profiles.of("Y & X").
Closes gh-25340
The case of one data buffer containing multiple lines can could cause
a buffer leak due to a suspected issue in concatMapIterable. This
commit adds workarounds for that until the underlying issue is
addressed.
Closes gh-24346
- Add maxInMemorySize property to Decoder and HttpMessageReader
implementations that aggregate input to trigger
DataBufferLimitException when reached.
- For codecs that call DataBufferUtils#join, there is now an overloaded
variant with a maxInMemorySize extra argument. Internally, a custom
LimitedDataBufferList is used to count and enforce the limit.
- Jackson2Tokenizer and XmlEventDecoder support those limits per
streamed JSON object.
- Configurable limits for multipart requests with Synchronoss NIO.
- Centralized maxInMemorySize exposed via CodecConfigurer along with
ability to plug in an instance of MultipartHttpMessageWrite.
Closes gh-23884
This commit makes sure that DefaultResourceLoader consistently use
getProtocolResolvers() to access additional protocol resolvers. This
allows subclasses to define how the list is provided.
Closes gh-23564