Uploaded image for project: 'Commons Pool'
  1. Commons Pool
  2. POOL-376

invalidateObject should not return NullPointerException

    XMLWordPrintableJSON

Details

    Description

      GenericObjectPool.invalidateObject(T obj) should not return NullPointerException when obj is not null.

      Please see following stack trace:

      Caused by: java.lang.NullPointerException
              at org.apache.commons.pool2.impl.LinkedBlockingDeque.putLast(LinkedBlockingDeque.java:454)
              at org.apache.commons.pool2.impl.LinkedBlockingDeque.put(LinkedBlockingDeque.java:788)
              at org.apache.commons.pool2.impl.GenericObjectPool.destroy(GenericObjectPool.java:939)
              at org.apache.commons.pool2.impl.GenericObjectPool.invalidateObject(GenericObjectPool.java:618)
      

      Apparent reason: In destroy(PooledObject<T> toDestroy), create() may return null even though toDestroy is already destroyed.

      Please make the fix available for JDK 1.7.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sazzad M Sazzadul Hoque
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h