Skip to content

Kotlin: use the same mtimes as Java #9331

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

Merged
merged 2 commits into from
May 26, 2022

Conversation

smowton
Copy link
Contributor

@smowton smowton commented May 25, 2022

Previously Kotlin's use of IntelliJ's VirtualFile interface meant we got the containing JAR file's mtime, not that of the individual file entry.

@smowton smowton requested a review from a team as a code owner May 25, 2022 16:04
@github-actions github-actions bot added the Java label May 25, 2022
igfoo
igfoo previously approved these changes May 25, 2022
private static long getVirtualFileTimeStamp(VirtualFile vf, Logger log) {
if (vf.getFileSystem().getProtocol().equals("jar")) {
String[] parts = vf.getPath().split("!/");
if (parts.length == 2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we warn on != 2 (or perhaps > 2)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 done

@smowton smowton force-pushed the smowton/fix/kotlin-jar-file-entry-mtimes branch from 3a12426 to 4859704 Compare May 25, 2022 18:26
igfoo
igfoo previously approved these changes May 25, 2022
smowton added 2 commits May 26, 2022 11:59
Previously Kotlin's use of IntelliJ's VirtualFile interface meant we got the containing JAR file's mtime, not that of the individual file entry.
@smowton smowton force-pushed the smowton/fix/kotlin-jar-file-entry-mtimes branch from 4859704 to 1f2248c Compare May 26, 2022 10:59
@smowton smowton merged commit f7d9238 into github:main May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants