-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
The following case throws a NPE
Date defaultEpochDate = new Date(0);
mapToTimestamp(defaultEpochDate.toInstant())The problem is for this case EpochSecond and Nano are 0 and this builder does not allow it.
Line 164 in 7ffeba8
| Timestamp t = Timestamp.newBuilder().setSeconds(i.getEpochSecond()).setNanos(i.getNano()).build(); |
I think the solution could be to handle the 0 seconds case and use the Timestamp.getDefaultInstance() instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels