Community
Participate
Working Groups
4.11 and before. FileInfoAttributesMatcher.supportCreatedKey() is not implemented correctly It no longer works since Java uses plain numbers as version, e.g. 9. As a result, creation data and creation time attributes don't show up when using Java 9 or newer.
(In reply to Dani Megert from comment #0) > 4.11 and before. > > FileInfoAttributesMatcher.supportCreatedKey() is not implemented correctly > > It no longer works since Java uses plain numbers as version, e.g. 9. And it is also not needed, since we have target platform >= 1.8, and the code was to check >= 1.7. The fix is trivial and we only need remove not used code.
(In reply to Andrey Loskutov from comment #1) > (In reply to Dani Megert from comment #0) > > 4.11 and before. > > > > FileInfoAttributesMatcher.supportCreatedKey() is not implemented correctly > > > > It no longer works since Java uses plain numbers as version, e.g. 9. > > And it is also not needed, since we have target platform >= 1.8, and the > code was to check >= 1.7. > > The fix is trivial and we only need remove not used code. Correct :-).
(In reply to Dani Megert from comment #2) > > > > The fix is trivial and we only need remove not used code. > Correct :-). Dani, do you have an idea, why this code only supports Windows and Mac for the file creation attribute? I would allow this now for all platforms, I guess this was not supported earlier on Linux.
New Gerrit change created: https://git.eclipse.org/r/140145
(In reply to Eclipse Genie from comment #4) > New Gerrit change created: https://git.eclipse.org/r/140145 This only removed version check. Next one will remove platform check, I will test it on Monday on Linux.
New Gerrit change created: https://git.eclipse.org/r/140146
Gerrit change https://git.eclipse.org/r/140145 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=81b23ac034e91d0aed0a665a48d5c48246b52253
(In reply to Andrey Loskutov from comment #3) > (In reply to Dani Megert from comment #2) > > > > > > The fix is trivial and we only need remove not used code. > > Correct :-). > > Dani, do you have an idea, why this code only supports Windows and Mac for > the file creation attribute? I would allow this now for all platforms, I > guess this was not supported earlier on Linux. Correct. The code is 9 years old.
(In reply to Eclipse Genie from comment #6) > New Gerrit change created: https://git.eclipse.org/r/140146 While debugging this on RHEL 7.4 I see that sun.nio.fs.UnixNativeDispatcher.birthtimeSupported() returns false and the code in sun.nio.fs.UnixFileAttributes.creationTime() does return lastModifiedTime(); That is on both Java 8 and Java 11. So I guess it makes no sense to push patch https://git.eclipse.org/r/140146 to master yet. See also https://unix.stackexchange.com/questions/20460/how-do-i-do-a-ls-and-then-sort-the-results-by-date-created.
Verified in I20190407-1800.