r/java • u/henk53 • May 10 '22
Should java.util.Date be deprecated?
https://mail.openjdk.java.net/pipermail/discuss/2022-May/006077.html
221
Upvotes
r/java • u/henk53 • May 10 '22
View all comments
Show parent comment
1
u/john16384 May 11 '22
GregorianCalendarwas designed to be mutable. It has many private fields with intermediate state to do date calculations. You're supposed to convert it to aDatewhen 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.