Uploaded image for project: 'EJB Client Library (AS7+)'
  1. EJB Client Library (AS7+)
  2. EJBCLIENT-313

IllegalArgumentException in EJBClientInvocationContext.java:1116

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.0.15.Final
    • 4.0.12.Final
    • None

    Description

      Some calls to get throw IllegalArgumentException from wait method:

      java.lang.IllegalArgumentException: nanosecond timeout value out of range
              at java.lang.Object.wait(Object.java:452)
              at org.jboss.ejb.client.EJBClientInvocationContext$FutureResponse.get(EJBClientInvocationContext.java:1116)
      

      The code in line 1116 is:

      lock.wait(remaining / 1_000_000_000L, (int) (remaining % 1_000_000_000L));
      

      JavaDoc of method wait(long timeout, int nanos) says that it will throw:

      IllegalArgumentException - if the value of timeout is negative or the value of nanos is not in the range 0-999999.
      

      The problem is division/modulo by 1_000_000_000, instead of 1_000_000. In other places in the same class this bug is not present, for example in line 904.

      Attachments

        Issue Links

          Activity

            People

              chaowan@redhat.com Chao Wang
              dominik.derwinski Dominik DerwiƄski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: