Skip to content

Commit

Permalink
Fix null pointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Oct 17, 2023
1 parent 871406f commit 3c637db
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ protected String getLockId(final Path file) {
@Override
public String getActivity() {
return MessageFormat.format(LocaleFactory.localizedString("Changing timestamp of {0} to {1}", "Status"),
file.getName(), UserDateFormatterFactory.get().getShortFormat(modified));
file.getName(), modified != null ? UserDateFormatterFactory.get().getShortFormat(modified) :
created != null ? UserDateFormatterFactory.get().getShortFormat(created) : LocaleFactory.localizedString("Unknown"));
}

@Override
Expand Down

0 comments on commit 3c637db

Please sign in to comment.