remove all copy constructors and copy methods for all watchers

This commit is contained in:
Ingmar Goudt 2019-12-29 19:18:20 +01:00
parent e8303d551d
commit 702a1f2498
160 changed files with 94 additions and 1445 deletions

View file

@ -450,9 +450,24 @@ public class VerifyCardDataTest {
// errors on create
try {
Constructor<? extends Watcher> constructor = watcherClass.getDeclaredConstructor();
List<?> constructors = Arrays.asList(watcherClass.getDeclaredConstructors());
Constructor<? extends Watcher> constructor = (Constructor<? extends Watcher>) constructors.get(0);
Object[] args = new Object[constructor.getParameterCount()];
for (int index = 0; index < constructor.getParameterTypes().length; index++) {
Class<?> parameterType = constructor.getParameterTypes()[index];
if(parameterType.getSimpleName().equalsIgnoreCase("boolean")){
args[index]=false;
}
else {
args[index] = null;
}
}
constructor.setAccessible(true);
Watcher w1 = constructor.newInstance();
Watcher w1 = constructor.newInstance(args);
// errors on copy
try {