#784 Separate purge execution and purge task creation

- Delete accounts in PurgeExecutor, after permission check
This commit is contained in:
ljacqu
2016-07-17 17:33:25 +02:00
parent 2a4cda0709
commit 5953bfd012
10 changed files with 250 additions and 179 deletions
@@ -219,7 +219,7 @@ public abstract class AbstractResourceClosingTest {
Object element = PARAM_VALUES.get(genericType);
Preconditions.checkNotNull(element, "No sample element for list of generic type " + genericType);
if (List.class == parameterizedType.getRawType()) {
if (isAssignableFrom(parameterizedType.getRawType(), List.class)) {
return Arrays.asList(element, element, element);
} else if (Set.class == parameterizedType.getRawType()) {
return new HashSet<>(Arrays.asList(element, element, element));
@@ -229,6 +229,11 @@ public abstract class AbstractResourceClosingTest {
throw new IllegalStateException("Cannot build list for unexpected Type: " + type);
}
private static boolean isAssignableFrom(Type type, Class<?> fromType) {
return (type instanceof Class<?>)
&& ((Class<?>) type).isAssignableFrom(fromType);
}
/* Initialize the map of test values to pass to methods to satisfy their signature. */
private static Map<Class<?>, Object> getDefaultParameters() {
HashedPassword hash = new HashedPassword("test", "test");