Trivial code householding
- Replace `if (!x) ... else ...` with `if(x) ... else ...` - Avoid throwing RuntimeException; use children
This commit is contained in:
@@ -73,13 +73,13 @@ public class PasswordSecurityTest {
|
||||
Object[] arguments = invocation.getArguments();
|
||||
if (arguments[0] instanceof PasswordEncryptionEvent) {
|
||||
PasswordEncryptionEvent event = (PasswordEncryptionEvent) arguments[0];
|
||||
caughtClassInEvent = event.getMethod() != null ? event.getMethod().getClass() : null;
|
||||
caughtClassInEvent = event.getMethod() == null ? null : event.getMethod().getClass();
|
||||
event.setMethod(method);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}).when(pluginManager).callEvent(any(Event.class));
|
||||
initializer = new AuthMeServiceInitializer(new String[]{});
|
||||
initializer = new AuthMeServiceInitializer();
|
||||
initializer.register(NewSetting.class, settings);
|
||||
initializer.register(DataSource.class, dataSource);
|
||||
initializer.register(PluginManager.class, pluginManager);
|
||||
|
||||
@@ -152,7 +152,7 @@ public abstract class AbstractEncryptionMethodTest {
|
||||
*
|
||||
* @param method The method to create a test class for
|
||||
*/
|
||||
static void generateTest(EncryptionMethod method) {
|
||||
protected static void generateTest(EncryptionMethod method) {
|
||||
String className = method.getClass().getSimpleName();
|
||||
// Create javadoc and "public class extends" and the constructor call "super(new Class(),"
|
||||
System.out.println("/**\n * Test for {@link " + className + "}.\n */");
|
||||
|
||||
Reference in New Issue
Block a user