mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
Fix unit test
This commit is contained in:
@@ -51,6 +51,7 @@ import static com.google.common.base.Preconditions.*;
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
@@ -88,12 +89,17 @@ public class SecureKeyResolver extends SigningKeyResolverAdapter
|
||||
*/
|
||||
@Inject
|
||||
@SuppressWarnings("unchecked")
|
||||
public SecureKeyResolver(ConfigurationEntryStoreFactory storeFactory)
|
||||
public SecureKeyResolver(ConfigurationEntryStoreFactory storeFactory) {
|
||||
this(storeFactory, new SecureRandom());
|
||||
}
|
||||
|
||||
SecureKeyResolver(ConfigurationEntryStoreFactory storeFactory, Random random)
|
||||
{
|
||||
store = storeFactory
|
||||
.withType(SecureKey.class)
|
||||
.withName(STORE_NAME)
|
||||
.build();
|
||||
this.random = random;
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
@@ -163,7 +169,7 @@ public class SecureKeyResolver extends SigningKeyResolverAdapter
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** secure randon */
|
||||
private final SecureRandom random = new SecureRandom();
|
||||
private final Random random;
|
||||
|
||||
/** configuration entry store */
|
||||
private final ConfigurationEntryStore<SecureKey> store;
|
||||
|
||||
Reference in New Issue
Block a user