]
Daniel Čihák edited comment on WFLY-6672 at 2/8/17 9:05 AM:
------------------------------------------------------------
Pull request with test
EJB's async methods' Future#get should treat zero timeout as
"don't wait"
-------------------------------------------------------------------------
Key: WFLY-6672
URL:
https://issues.jboss.org/browse/WFLY-6672
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 8.2.0.Final
Reporter: Vsevolod Golovanov
Assignee: Stuart Douglas
Fix For: 10.1.0.CR1, 10.1.0.Final
Say there is an asynchronous EJB method:
{code}
@Asynchronous
public Future<Boolean> method() {
...
}
{code}
Calling Future#get with a zero timeout:
{code}
if (bean.method().get(0, TimeUnit.MILLISECONDS))
{code}
results in a block until the task is finished.
Instead I expected zero waiting, because {{java.util.concurrent.Future.get(long,
TimeUnit)}} doesn't specify any special treatment for a zero timeout value.