Skip to content

Commit

Permalink
add null check to EnqueuedTimeImpl.zonedDateTime() (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemhu authored Feb 14, 2025
1 parent ff0bab7 commit 3896028
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/teragrep/akv_01/time/EnqueuedTimeImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ public EnqueuedTimeImpl(final Object origin) {

@Override
public ZonedDateTime zonedDateTime() {
return ZonedDateTime.parse(origin.toString() + "Z");
if (origin == null) {
throw new IllegalArgumentException("EnqueuedTime origin is null");
}
return ZonedDateTime.parse(origin + "Z");
}

@Override
Expand Down

0 comments on commit 3896028

Please sign in to comment.