-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7902698: Collision of zero timestamp as a special value with use in filesystems #22
Conversation
👋 Welcome back cushon! A progress list of the required criteria for merging this PR into |
@cushon This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dbessono) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that previously zero default value served as "undefined yet" for these fields, now switched to "-1" as their default value. However 'URLConnection::getLastModified' returns "0 if not known" and 'File::lastModified' spec asserts: "returns 0L if the file does not exist or if an I/O error occurs. The value may be negative indicating the number of milliseconds before the epoch".
It possibly would be more reliable and readable to switch types of these fields from 'long' to OptionalLong with OptionalLong.empty() as their default value.
Thanks for the review!
Done |
@@ -903,7 +904,7 @@ public synchronized boolean refreshIfNeeded() { | |||
|
|||
// may be less than if the custom finder starts to return a | |||
// bogus value - like zero or 1 for whatever reason | |||
if (thisScanDate <= lastScanDate) { | |||
if (lastScanDate.isEmpty() || thisScanDate <= lastScanDate.getAsLong()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely the same thing here, the mentioned SelectionTest
passes with
if (lastScanDate.isPresent() && thisScanDate <= lastScanDate.getAsLong() ) {
return false;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seeing a failure of com.sun.javatest.SelectionTest regression test... inlined comments on the possible changes
/integrate |
/sponsor |
Going to push as commit 6e1a709.
Your commit was automatically rebased without conflicts. |
This fixes a bug when the timestamp of a test file is set to zero, since jtharness currently uses zero as a special value. See discussion in CODETOOLS-7902698.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jtharness pull/22/head:pull/22
$ git checkout pull/22
Update a local copy of the PR:
$ git checkout pull/22
$ git pull https://git.openjdk.java.net/jtharness pull/22/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22
View PR using the GUI difftool:
$ git pr show -t 22
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jtharness/pull/22.diff