RFR: 8341735: Rewrite the build/AbsPathsInImage.java test to not load the entire file at once
Cesar Soares Lucas
cslucas at openjdk.org
Mon Jul 7 18:27:39 UTC 2025
On Mon, 7 Jul 2025 18:22:22 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:
>> These changes should prevent entire binary files from being loaded into memory for build/AbsPathsInImage.java test. I chose a default buffer size of 8KB since BufferedInputStream uses that, but open to alternative solutions. GHA passes and test passes on linux x64.
>
> test/jdk/build/AbsPathsInImage.java line 186:
>
>> 184: byte[] buffer = new byte[8192];
>> 185: List<String> matches = new ArrayList<>();
>> 186: try(InputStream inputStream = Files.newInputStream(file)) {
>
> NIT: space after `try`?
same for the `while` below.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26030#discussion_r2190777987
More information about the build-dev
mailing list