Cleanup: avoid injecting Injector directly
- Inject SingletonStore to restrict the possible functions - Refactor PasswordSecurityTest to correspond to the usual way of testing
This commit is contained in:
@@ -57,7 +57,7 @@ public class EncryptionMethodInfoGatherer {
|
||||
|
||||
private static MethodDescription createDescription(HashAlgorithm algorithm) {
|
||||
Class<? extends EncryptionMethod> clazz = algorithm.getClazz();
|
||||
EncryptionMethod method = injector.newInstance(clazz);
|
||||
EncryptionMethod method = injector.createIfHasDependencies(clazz);
|
||||
if (method == null) {
|
||||
throw new NullPointerException("Method for '" + algorithm + "' is null");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user