RFR: 7902698: Collision of zero timestamp as a special value with use in filesystems [v2]
Liam Miller-Cushon
cushon at openjdk.java.net
Wed Feb 2 22:47:52 UTC 2022
On Wed, 2 Feb 2022 22:18:25 GMT, Dmitry Bessonov <dbessono at openjdk.org> wrote:
>> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use OptionalLong instead of -1L
>
> src/com/sun/javatest/TRT_TreeNode.java line 794:
>
>> 792: File thisDir = new File(TestResultTable.getRootRelativePath(this));
>> 793: long lmd = table.getLastModifiedTime(thisDir);
>> 794: if (lastScanDate.isEmpty() || lmd <= lastScanDate.getAsLong()) {
>
> Seen a failure of com.sun.javatest.SelectionTest when checking the latest patch... It seems that here a more correct replacement could be
>
>
> if (lastScanDate.isPresent() && lmd <= lastScanDate.getAsLong()) {
> return;
> }
Thanks for the catch, I have implemented the suggested fix and verified the test is now passing
> src/com/sun/javatest/TRT_TreeNode.java line 907:
>
>> 905: // may be less than if the custom finder starts to return a
>> 906: // bogus value - like zero or 1 for whatever reason
>> 907: if (lastScanDate.isEmpty() || thisScanDate <= lastScanDate.getAsLong()) {
>
> Likely the same thing here, the mentioned `SelectionTest` passes with
>
> if (lastScanDate.isPresent() && thisScanDate <= lastScanDate.getAsLong() ) {
> return false;
> }
Done
-------------
PR: https://git.openjdk.java.net/jtharness/pull/22
More information about the jtharness-dev
mailing list