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:
ljacqu
2017-03-21 22:59:21 +01:00
parent d19748fe5b
commit 7dbf5551c9
6 changed files with 80 additions and 86 deletions
@@ -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");
}