spring-boot/spring-boot-project/spring-boot-tools
Andy Wilkinson f28caee30d Fix NestedJarFile.JarEntryInputStream's available() behavior
Previously, available() would return 0 initially and then negative
values once some data head been read. It should be a positive value
(for entries with content) initially a decrease as data is read
reaching zero once an entry's data has been read in its entirety.

This commit initialises the count of the remaining bytes to
be equal to the entry's uncompressed size. It also removes logic
that closes the stream when remaining equals zero upon read or skip.
This condition was not reached before as remaining would become
negative as soon as any data was read or skipped. With the correct
initialization of remaining, the condition is now reached and it
results in test failures due to premature closure. Furthermore, the
javadoc of read and skip do not require the stream to be closed
when the reach end of file.

Closes gh-47056
2025-09-05 17:29:22 +01:00
..
spring-boot-antlib Add license header to gradle files 2025-06-20 17:20:50 -07:00
spring-boot-autoconfigure-processor Add license header to gradle files 2025-06-20 17:20:50 -07:00
spring-boot-buildpack-platform Add license header to gradle files 2025-06-20 17:20:50 -07:00
spring-boot-cli Add license header to gradle files 2025-06-20 17:20:50 -07:00
spring-boot-configuration-metadata Add license header to gradle files 2025-06-20 17:20:50 -07:00
spring-boot-configuration-metadata-changelog-generator Add license header to gradle files 2025-06-20 17:20:50 -07:00
spring-boot-configuration-processor Polish 2025-09-05 14:13:02 +02:00
spring-boot-gradle-plugin Simplify code by making of us shouldResolveConsistentlyWith 2025-08-01 06:57:06 +01:00
spring-boot-gradle-test-support Use build instead of temp dir for Gradle TestKit directories 2025-07-22 11:24:40 +01:00
spring-boot-jarmode-tools Add license header to gradle files 2025-06-20 17:20:50 -07:00
spring-boot-loader Fix NestedJarFile.JarEntryInputStream's available() behavior 2025-09-05 17:29:22 +01:00
spring-boot-loader-classic Add license header to gradle files 2025-06-20 17:20:50 -07:00
spring-boot-loader-tools Streamline CRC and hash calculation when preparing stored entries 2025-06-25 13:31:04 +01:00
spring-boot-maven-plugin Add @EnabledOnLocale annotation for locale-based tests 2025-06-27 12:45:35 +02:00
spring-boot-properties-migrator Add license header to gradle files 2025-06-20 17:20:50 -07:00
spring-boot-test-support Add @EnabledOnLocale annotation for locale-based tests 2025-06-27 12:45:35 +02:00
spring-boot-test-support-docker Add license header to gradle files 2025-06-20 17:20:50 -07:00