jira-importer opened a new issue, #1367:
URL: https://github.com/apache/httpcomponents-core/issues/1367

   **[Gary D. 
Gregory](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=garydgregory)**
 opened 
**[HTTPCORE-510](https://issues.apache.org/jira/browse/HTTPCORE-510?redirect=false)**
 and commented
   
   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.
   
   
   ---
   
   **Backported to:** 
[4.4.10](https://github.com/apache/httpcomponents-core/milestone/47?closed=1)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to