Prior to this commit, DataBufferUtils$ReadCompletionHandler#read() invoked AsynchronousFileChannel#read(ByteBuffer, long, Attachment, CompletionHandler) without guarding against exceptions thrown directly by that call. Although that method is documented to report failures asynchronously via the supplied CompletionHandler, some platform- specific implementations can instead throw synchronously – for example, on Windows with JDK 25, when the JDK rejects a ByteBuffer backed by a closeable shared memory Arena, as produced by Netty 4.2's off-heap buffer allocation. When such an exception is thrown from a recursive read() invocation triggered from completed() – which happens once a resource requires more than a single chunk – the exception has no path back to the FluxSink: it escapes on whatever thread invoked the CompletionHandler, and the resulting Flux never signals onError or onComplete. In practice, this surfaced as an indefinite hang when serving a Resource whose HTTP response is not a ZeroCopyHttpOutputMessage, since ResourceHttpMessageWriter falls back to ResourceEncoder, which reads the resource via DataBufferUtils. To address that, this commit wraps the channel.read(...) call in a try/catch block and routes any non-fatal Throwable to the existing failed(Throwable, Attachment) handler, via Exceptions.throwIfFatal(), mirroring the equivalent fix already applied to the write side for gh-36184. This ensures the allocated DataBuffer is released and the Flux always terminates with a proper error signal instead of leaking a buffer or hanging silently. See gh-36184 Closes gh-37143
Spring Framework

This is the home of the Spring Framework: the foundation for all Spring projects. Collectively the Spring Framework and the family of Spring projects are often referred to simply as "Spring".
Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the Overview section of the reference documentation for a more complete introduction.
Code of Conduct
This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@spring.io.
Access to Binaries
For access to artifacts or a distribution zip, see the Spring Framework Artifacts wiki page.
Documentation
The Spring Framework maintains reference documentation (published and source), GitHub wiki pages, and an API reference. There are also guides and tutorials across Spring projects.
Micro-Benchmarks
See the Micro-Benchmarks wiki page.
Build from Source
See the Build from Source wiki page and the CONTRIBUTING.md file.
Continuous Integration Builds
CI builds are defined with GitHub Actions workflows.
Stay in Touch
Follow @SpringCentral, @SpringFramework, and its team members on 𝕏. In-depth articles can be found at The Spring Blog, and releases are announced via our releases feed.
License
The Spring Framework is released under version 2.0 of the Apache License.