Skip to content

Commit

Permalink
Fixes #83 Null pointer when using NullConfigurationProvider
Browse files Browse the repository at this point in the history
Return a default SecureRandom object from getPrng() to avoid null pointers
in the code when NullConfigurationProvider is used.
  • Loading branch information
Darren Seryck authored and Darren Seryck committed Nov 10, 2017
1 parent 9e26fc1 commit 4cf285a
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -81,7 +81,11 @@ public boolean isTokenPerPagePrecreateEnabled() {

@Override
public SecureRandom getPrng() {
return null;
try {
return SecureRandom.getInstance("SHA1PRNG", "SUN");
} catch (Exception e) {
throw new RuntimeException(e);
}
}

@Override
Expand Down

0 comments on commit 4cf285a

Please sign in to comment.