Date: Thu, 17 Jan 2019 07:15:43 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 235018] java/openjdk8: adding millisecond resolution to get/setLastModified breaks many apps Message-ID: <bug-235018-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235018 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@FreeBSD.org Reporter: aryeh.friedman@gmail.com Flags: maintainer-feedback?(java@FreeBSD.org) Assignee: java@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) =3D=3D 0) { - rv =3D 1000 * (jlong)sb.st_mtime; + rv =3D (jlong)sb.st_mtim.tv_sec * 1000; + rv +=3D (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 w= hen they are in fact equal without the above patch. This fundamentally breaks Java's promise of "Compile one, run anywhere" --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235018-7788>