You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The classes in the current Segment Java SDK accept the old java.util.Date in method signatures, for example:
var message = TrackMessage.builder(event.documentName())
.timestamp(java.util.Date.from(event.time())) // <-- here we have to convert Instant to Date
.userId(event.user().id())
.properties(properties);
Java 8 introduced the new The Date-Time APIs (e.g. java.time.Instant), which are preferred over the old java.util.Date/Calendar for their immutability, thread safety, and expressiveness.
It seems it should be possible to add overloaded method versions to support the new Date-Time APIs without changing or removing the existing methods.