aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/.settings
diff options
context:
space:
mode:
authorIvan Frade <ifrade@google.com>2024-11-04 14:21:24 -0800
committerMatthias Sohn <matthias.sohn@sap.com>2024-11-08 01:06:58 +0100
commit88f8321bafeb9476bbb9b42b349521c68e375e4f (patch)
treea1266108e4557ec28bc4b75bb4ff044391bda40b /org.eclipse.jgit/.settings
parentb2accb0e9c07fa40fa9d7bf266a5763a1f63cc90 (diff)
downloadjgit-88f8321bafeb9476bbb9b42b349521c68e375e4f.tar.gz
jgit-88f8321bafeb9476bbb9b42b349521c68e375e4f.zip
SystemReader: Offer methods with java.time API
Error prone explains: The Date API is full of major design flaws and pitfalls and should be avoided at all costs. Prefer the java.time APIs, specifically, java.time.Instant (for physical time) and java.time.LocalDate[Time] (for civil time). Add to SystemReader methods to get the time and timezone in the new java.time classes (Instant/ZoneId) and mark as deprecated their old counterparts. The mapping of methods is: * #getCurrentTime -> #now (returns Instant instead of int) * #getTimezone -> #getTimeZoneAt (returns ZoneOffset intead of int) * #getTimeZone -> #getTimeZoneId (return ZoneId instead of TimeZone) Change-Id: Ic55b2f442a40046ff0ed24f61f566fc7416471be
Diffstat (limited to 'org.eclipse.jgit/.settings')
-rw-r--r--org.eclipse.jgit/.settings/.api_filters14
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters
index f2c73f5c48..aed6683062 100644
--- a/org.eclipse.jgit/.settings/.api_filters
+++ b/org.eclipse.jgit/.settings/.api_filters
@@ -36,4 +36,18 @@
</message_arguments>
</filter>
</resource>
+ <resource path="src/org/eclipse/jgit/util/SystemReader.java" type="org.eclipse.jgit.util.SystemReader">
+ <filter id="336695337">
+ <message_arguments>
+ <message_argument value="org.eclipse.jgit.util.SystemReader"/>
+ <message_argument value="getTimeZoneAt(Instant)"/>
+ </message_arguments>
+ </filter>
+ <filter id="336695337">
+ <message_arguments>
+ <message_argument value="org.eclipse.jgit.util.SystemReader"/>
+ <message_argument value="now()"/>
+ </message_arguments>
+ </filter>
+ </resource>
</component>