[jboss-jira] [JBoss JIRA] (WFLY-9721) AsyncInvocationTask.get() throws CancellationException
David Lloyd (JIRA)
issues at jboss.org
Mon May 7 15:49:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-9721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Lloyd resolved WFLY-9721.
-------------------------------
Resolution: Rejected
> AsyncInvocationTask.get() throws CancellationException
> ------------------------------------------------------
>
> Key: WFLY-9721
> URL: https://issues.jboss.org/browse/WFLY-9721
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 11.0.0.Final
> Reporter: Denis Shklyaev
> Priority: Optional
>
> AsyncInvocationTask.get() on cancelled task in Wildfly 11 throws CancellationException via EjbLogger, but the behavior is not declared in method signature:
> {code:java}
> public synchronized Object get() throws InterruptedException, ExecutionException {
> for (;;) switch (status) {
> case ST_RUNNING: wait(); break;
> *case ST_CANCELLED: throw EjbLogger.ROOT_LOGGER.taskWasCancelled();*
> case ST_FAILED: throw new ExecutionException(failed);
> case ST_DONE: return result;
> default: throw Assert.impossibleSwitchCase(status);
> }
> }
> {code}
> Wildfly 10.01.0 code is different:
> {code:java}
> public synchronized Object get() throws InterruptedException, ExecutionException {
> while (!isDone()) {
> wait();
> }
> if (failed != null) {
> throw new ExecutionException(failed);
> }
> return result;
> }
> {code}
> It throws InterruptedException instead as declared.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list