Repository: commons-pool Updated Branches: refs/heads/master e7f09417f -> 903feacc6
[POOL-338] GenericObjectPool constructor throws an exception. Use a multi-catch clause instead of individual catch clauses. Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/903feacc Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/903feacc Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/903feacc Branch: refs/heads/master Commit: 903feacc675edd98c58632d5bbba71cac2eebf23 Parents: e7f0941 Author: Gary Gregory <[email protected]> Authored: Thu Apr 5 13:42:59 2018 -0600 Committer: Gary Gregory <[email protected]> Committed: Thu Apr 5 13:42:59 2018 -0600 ---------------------------------------------------------------------- .../apache/commons/pool2/impl/BaseGenericObjectPool.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/903feacc/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 b20b8d3..b6ceb0e 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -619,15 +619,8 @@ public abstract class BaseGenericObjectPool<T> extends BaseObject { throw new IllegalArgumentException( "[" + evictionPolicyClassName + "] does not implement " + EVICTION_POLICY_TYPE_NAME); } - } catch (final ClassNotFoundException e) { - throw new IllegalArgumentException(exMessage, e); - } catch (final InstantiationException e) { - throw new IllegalArgumentException(exMessage, e); - } catch (final IllegalAccessException e) { - throw new IllegalArgumentException(exMessage, e); - } catch (final InvocationTargetException e) { - throw new IllegalArgumentException(exMessage, e); - } catch (final NoSuchMethodException e) { + } catch (final ClassNotFoundException | InstantiationException | IllegalAccessException + | InvocationTargetException | NoSuchMethodException e) { throw new IllegalArgumentException(exMessage, e); } }
