spring-boot/spring-boot-project
Phillip Webb 9b0593efe3 Fallback to RandomAccessFile on ClosedByInterruptException
Refine the fix for gh-38611 so that `ClosedByInterruptException` no
longer retries in a loop.

Our previous fix was flawed due to the fact that another interrupt
could occur after we clear the first and whilst we are reading data.
If this happens 10 times in a row, we raise an exception and end up
causing NoClassDefFoundError errors.

Our new approach retains the use of `FileChannel` and a direct buffer
up to the point that a `ClosedByInterruptException` is raised or the
thread is detected as interrupted.  At that point, we temporarily
switch to using a `RandomAccessFile` to access the data. This will
block the thread until the data has been read.

Fixes gh-40096
2024-04-16 14:47:07 -07:00
..
spring-boot Merge branch '3.1.x' into 3.2.x 2024-04-16 13:40:03 +02:00
spring-boot-actuator Revert "Exclude unwanted javax.inject dependency from Data Couchbase" 2024-04-12 11:19:16 +01:00
spring-boot-actuator-autoconfigure Do not overwrite attributes in ClientObservationConventionAdapter 2024-04-12 16:31:02 +02:00
spring-boot-autoconfigure Revert "Exclude unwanted javax.inject dependency from Data Couchbase" 2024-04-12 11:19:16 +01:00
spring-boot-dependencies Upgrade to Spring Security 6.2.4 2024-04-16 19:47:35 +01:00
spring-boot-devtools Merge branch '3.1.x' into 3.2.x 2024-03-27 09:35:44 +01:00
spring-boot-docker-compose Merge branch '3.1.x' into 3.2.x 2024-03-27 09:35:44 +01:00
spring-boot-docs Revert "Exclude unwanted javax.inject dependency from Data Couchbase" 2024-04-12 11:19:16 +01:00
spring-boot-parent Minimize scope of version management for commons-compress 2024-02-06 15:08:15 +00:00
spring-boot-starters Revert "Exclude unwanted javax.inject dependency from Data Couchbase" 2024-04-12 11:19:16 +01:00
spring-boot-test Merge branch '3.1.x' into 3.2.x 2024-04-03 16:30:41 -05:00
spring-boot-test-autoconfigure Revert "Exclude unwanted javax.inject dependency from Data Couchbase" 2024-04-12 11:19:16 +01:00
spring-boot-testcontainers Merge branch '3.1.x' into 3.2.x 2024-02-21 15:27:27 -08:00
spring-boot-tools Fallback to RandomAccessFile on ClosedByInterruptException 2024-04-16 14:47:07 -07:00