[Bug 235018] java/openjdk8: adding millisecond resolution to get/setLastModified breaks many apps
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jan 17 07:15:46 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235018
Bug ID: 235018
Summary: java/openjdk8: adding millisecond resolution to
get/setLastModified breaks many apps
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: java at FreeBSD.org
Reporter: aryeh.friedman at gmail.com
Flags: maintainer-feedback?(java at FreeBSD.org)
Assignee: java at FreeBSD.org
The first diff in
files/patch-jdk-src-solaris-native-java-io-UnixFileSystem_md.c:
--- jdk/src/solaris/native/java/io/UnixFileSystem_md.c.orig 2018-12-12
23:07:51.229721000 +0100
+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2018-12-12
23:12:21.847169000 +0100
@@ -208,7 +208,8 @@
WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) {
struct stat64 sb;
if (stat64(path, &sb) == 0) {
- rv = 1000 * (jlong)sb.st_mtime;
+ rv = (jlong)sb.st_mtim.tv_sec * 1000;
+ rv += (jlong)sb.st_mtim.tv_nsec / 1000000;
}
} END_PLATFORM_STRING(env, path);
return rv;
Breaks many applications that depend on second vs. millisecond resolution...
for example the Last-modified header in tomcat is now incorrect and in a
REST-like API/DB it leads the header and actual file time not being equal when
they are in fact equal without the above patch.
This fundamentally breaks Java's promise of "Compile one, run anywhere"
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-java
mailing list