Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1250

StatelessInstanceManager divide by null causes ArithmeticException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.3
    • None
    • container system
    • 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);

      Attachments

        Activity

          People

            madshaddow Andy Gumbrecht
            madshaddow Andy Gumbrecht
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified