You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2018/02/06 19:23:00 UTC
[jira] [Closed] (HTTPCORE-510) Avoid an ArithmeticException in
AbstractMultiworkerIOReactor by failing earlier by checking ioThreadCount
in IOReactorConfig constructor.
[ https://issues.apache.org/jira/browse/HTTPCORE-510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Gregory closed HTTPCORE-510.
---------------------------------
Resolution: Fixed
Fix Version/s: 5.0-beta3
4.4.10
> Avoid an ArithmeticException in AbstractMultiworkerIOReactor by failing earlier by checking ioThreadCount in IOReactorConfig constructor.
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HTTPCORE-510
> URL: https://issues.apache.org/jira/browse/HTTPCORE-510
> Project: HttpComponents HttpCore
> Issue Type: Improvement
> Reporter: Gary Gregory
> Assignee: Gary Gregory
> Priority: Major
> Fix For: 4.4.10, 5.0-beta3
>
>
> 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.
> {noformat}
> 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]
> {noformat}
> Instead of the above, you will get an {{IllegalArgumentException}} from the {{IOReactorConfig}} constructor.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org