In the constructor
public SimpleIoProcessorPool(Class<? extends IoProcessor<T>>
processorType, Executor executor, int size)
1) There's the following code:
// We create at least one processor
try {
try {
processorConstructor =
processorType.getConstructor(ExecutorService.class);
pool[0] =
processorConstructor.newInstance(this.executor);
} catch (NoSuchMethodException e) {
// To the next step...
}
try {
processorConstructor =
processorType.getConstructor(Executor.class);
pool[0] =
processorConstructor.newInstance(this.executor);
} catch (NoSuchMethodException e) {
// To the next step...
}
try {
processorConstructor = processorType.getConstructor();
usesExecutorArg = false;
pool[0] = processorConstructor.newInstance();
} catch (NoSuchMethodException e) {
// To the next step...
}
Should only attempt the second & third processorConstructor assignments
if the first one fails etc.?
2) The JavaDoc is missing the size parameter
Regards,
Jan T.