Repository: commons-pool Updated Branches: refs/heads/master 903feacc6 -> 848500e97
OutOfMemoryError extends VirtualMachineError so it does not need to be caught separately. Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/848500e9 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/848500e9 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/848500e9 Branch: refs/heads/master Commit: 848500e97b8399578e02653e20893f10030e7a46 Parents: 903feac Author: Gary Gregory <[email protected]> Authored: Thu Apr 5 13:46:16 2018 -0600 Committer: Gary Gregory <[email protected]> Committed: Thu Apr 5 13:46:16 2018 -0600 ---------------------------------------------------------------------- .../commons/pool2/impl/BaseGenericObjectPool.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/848500e9/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java index b6ceb0e..d2bb641 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -879,9 +879,9 @@ public abstract class BaseGenericObjectPool<T> extends BaseObject { * Swallows an exception and notifies the configured listener for swallowed * exceptions queue. * - * @param e exception to be swallowed + * @param swallowException exception to be swallowed */ - final void swallowException(final Exception e) { + final void swallowException(final Exception swallowException) { final SwallowedExceptionListener listener = getSwallowedExceptionListener(); if (listener == null) { @@ -889,11 +889,9 @@ public abstract class BaseGenericObjectPool<T> extends BaseObject { } try { - listener.onSwallowException(e); - } catch (final OutOfMemoryError oome) { - throw oome; - } catch (final VirtualMachineError vme) { - throw vme; + listener.onSwallowException(swallowException); + } catch (final VirtualMachineError e) { + throw e; } catch (final Throwable t) { // Ignore. Enjoy the irony. }
