Community
Participate
Working Groups
When the last modified timestamp of a local file is 0, The Properties view shows "Last modified" as "January 1, 1970 9:00:00 AM" (in case of JST). The enhancement requirement is to show blank as the Windows Explorer does.
I've committed the fix to cvs.
Dave - I see some risk that your change can produce a ClassCastException as regression: when client requests an unformatted date, the old code returned null (which can be cast to Date). Now you return String "" (which cannot be cast to Date). Reopening - please address. In general, I would appreciate seeing patches attached in bugzilla for any change in the Maintenance Stream.
(In reply to comment #2) > Dave - I see some risk that your change can produce a ClassCastException as > regression: when client requests an unformatted date, the old code returned > null (which can be cast to Date). Now you return String "" (which cannot be > cast to Date). Martin, I don't know what your problem is here. The getPropertyValue() API returns an Object. There is no requirement or expectation that a Date be returned. In fact, in the formatted case, it is also a String that is returned, not a Date.
It's true that the API returns an Object. But, in the past, when a client requested an Object for Property ISystemPropertyConstants.P_FILE_LASTMODIFIED it would always have returned a Date or null (which could be cast) You haven't changed the binary API signature, and it's true that there is no formal API contract specifying what sort of Object is returned when. But still, you have changed the functionality. And this may cause a regression which is unnecessary. After all, the fix you want to make is for the System view. Which requests a formatted date, which is returned as a String. I'm just asking that you make your change in a safer way, i.e. return the "" only if a formatted Date is requested.
Created attachment 177024 [details] patch to only return string for modified time when using formatted Fair enough, I can change this so as long as that doesn't effect what we show the user. Here's a patch that changes to the return the value of "" only in formatted cases. In RSE UI cases, it should be the formatted value that gets displayed so this change should preserve the original fix.
Thanks - looks good to me. Can you commit this after testing that the original intent of the fix is indeed preserved ?
(In reply to comment #6) > Thanks - looks good to me. Can you commit this after testing that the original > intent of the fix is indeed preserved ? I checked and the fix is preserved so I've committed the change.
Marking this as fixed since the update was committed.
Verified that this has been released to 3.3m3 as well.