Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/222-Infrequent-NullPointerException-on-assigning…
Browse files Browse the repository at this point in the history
…-random-default-images-to-events' closes #222
  • Loading branch information
McPringle committed Mar 12, 2016
2 parents 6d31c23 + dec4308 commit 48d1ce9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void uploadImage(@NotNull final Long eventId, @NotNull final byte[] image
}

public void chooseRandomDefaultImage(@NotNull final Long eventId) {
final int index = new Random().nextInt(14);
final int index = new Random().nextInt(14) + 1;
final String filename = String.format("default-event-image-%03d.png", index);
Politician.beatAroundTheBush(() -> {
try (final InputStream inputStream =
Expand Down

0 comments on commit 48d1ce9

Please sign in to comment.