SimplePool.permitAcquired method swallows InterruptedException

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.9.1
    • Affects Version/s: 2.9.0
    • Component/s: None
    • None
    • Environment:
      3.5.2-3.fc17.x86_64/JDK1.7.0_06 (x64)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SimplePool.permitAcquired(long) method catches InterruptedException but fails to restore interrupted state of the thread thus effectively suppressing the effect of thread interruption.
      Here is the (abbreviated) code in question (SimplePool.java lines 146-159):

          private boolean permitAcquired(final long waitTime) {
              try {
                  // ......
              } catch (InterruptedException e) {
                  return false;
              }
          }
      

      Instead it should be:

          private boolean permitAcquired(final long waitTime) {
              try {
                  // ......
              } catch (InterruptedException e) {
                  Thread.currentThread().interrupt();
                  return false;
              }
          }
      

            Assignee:
            Jeffrey Yemin
            Reporter:
            Alexei Krainiouk
            None
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: