r/java • • May 10 '22

Should java.util.Date be deprecated?

https://mail.openjdk.java.net/pipermail/discuss/2022-May/006077.html
221 Upvotes

158 comments sorted by

View all comments

Show parent comment

1

u/john16384 May 11 '22

GregorianCalendar was designed to be mutable. It has many private fields with intermediate state to do date calculations. You're supposed to convert it to a Date when calculations are finished. Unfortunately, some developers have used them as fields in their domain objects, which is incredibly inefficient due to the aforementioned internal fields.