Skip to content
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

Prefer JavaMillis starting from Java 10 #274

Merged
merged 1 commit into from
Oct 18, 2019
Merged

Prefer JavaMillis starting from Java 10 #274

merged 1 commit into from
Oct 18, 2019

Conversation

slandelle
Copy link
Contributor

Motivation:

JavaMillis is currently only preferred for Java 11+.
But bug that chopped off millis from Files.getLastModifiedTime was fixed in Java 10, see https://bugs.openjdk.java.net/browse/JDK-8177809

Modification:

Have jdkTimestamps evaluate to true for Java 10.

Result:

Milli doesn't use JNA on Java 10.

Motivation:

JavaMillis is currently only preferred for Java 11+.
But bug that chopped off millis from Files.getLastModifiedTime was fixed in Java 10, see https://bugs.openjdk.java.net/browse/JDK-8177809

Modification:

Have jdkTimestamps evaluate to true for Java 10.

Result:

Milli doesn't use JNA on Java 10.
@slandelle
Copy link
Contributor Author

Side question: why do you prefer java.nio.Files#getLastModifiedTime over java.io.File#lastModified?

@eatkins
Copy link
Contributor

eatkins commented Oct 18, 2019

Side question: why do you prefer java.nio.Files#getLastModifiedTime over java.io.File#lastModified?

Long term we want to move all of the sbt io apis from io -> nio. Even if the public api exposes io, we have started moving the implementations to largely use nio under the hood.

Copy link
Contributor

@eatkins eatkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@eatkins eatkins merged commit a593029 into sbt:develop Oct 18, 2019
@eed3si9n eed3si9n added this to the 1.4.0 milestone Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants