Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1.3
-
None
-
NA
Description
org.apache.openejb.core.stateless.StatelessInstanceManager line 399
long offset = ((long) (maxAge / min * i * maxAgeOffset)) % maxAge;
Quite often gets 0 for maxAge (for example):
ArithmeticException - 0 / 2 * 0 * -1.0
So I'd like to suggest a fix:
long offset = (maxAge > 0 ? ((long) (maxAge / min * i * maxAgeOffset)) % maxAge : 0L);