RFR: 8326100: DeflaterDictionaryTests should use Deflater.getBytesWritten instead of Deflater.getTotalOut [v2]
Alan Bateman
alanb at openjdk.org
Mon Feb 19 08:02:56 UTC 2024
On Sun, 18 Feb 2024 10:56:47 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:
> Thanks for your review Alan!
>
> > The hazard when the format specifiers are all %s.
>
> Not sure I understand your comment since all arguments are of the same type (int) anyhow, I guess they would still be easy to get wrong or in the wrong order. Was that the hazard you refer to?
Yes, it's easy to get a silent mismatch. In this case, the first message printed by testByteArray, the second parameter should have been the Adler but it was actually printing the number of bytes written. You've fixed it, and switched to %d, so all good.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17901#issuecomment-1951892484
More information about the core-libs-dev
mailing list