Description
Avoid an ArithmeticException in AbstractMultiworkerIOReactor by failing eariler by checking ioThreadCount in IOReactorConfig constructor.
If you build an IOReactorConfig with an ioThreadCount equal to 0, you will get the exception below. This can be avoided by failing earlier in the IOReactorConfig constructor.
java.lang.ArithmeticException: / by zero at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.addChannel(AbstractMultiworkerIOReactor.java:473) ~[httpcore-nio-4.4.9.jar:4.4.9] at org.apache.http.impl.nio.reactor.DefaultListeningIOReactor.processEvent(DefaultListeningIOReactor.java:189) ~[httpcore-nio-4.4.9.jar:4.4.9] at org.apache.http.impl.nio.reactor.DefaultListeningIOReactor.processEvents(DefaultListeningIOReactor.java:151) ~[httpcore-nio-4.4.9.jar:4.4.9] at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) ~[httpcore-nio-4.4.9.jar:4.4.9]
Instead of the above, you will get an IllegalArgumentException from the IOReactorConfig constructor.