Why not use "catch (InvocationTargetException | InstantiationException | IllegalAccessException e) {..."
? On Wed, Aug 10, 2016 at 1:25 PM, <er...@apache.org> wrote: > Repository: commons-rng > Updated Branches: > refs/heads/master 16144a47a -> 42ca85b3d > > > CheckStyle. > > > Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo > Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/42ca85b3 > Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/42ca85b3 > Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/42ca85b3 > > Branch: refs/heads/master > Commit: 42ca85b3d9e322eff81a0a2f60d489bb2a733614 > Parents: 16144a4 > Author: Gilles <er...@apache.org> > Authored: Wed Aug 10 22:24:47 2016 +0200 > Committer: Gilles <er...@apache.org> > Committed: Wed Aug 10 22:24:47 2016 +0200 > > ---------------------------------------------------------------------- > .../java/org/apache/commons/rng/internal/ProviderBuilder.java | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/commons-rng/blob/ > 42ca85b3/src/main/java/org/apache/commons/rng/internal/ > ProviderBuilder.java > ---------------------------------------------------------------------- > diff --git > a/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java > b/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java > index c9522e8..f3614cd 100644 > --- a/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java > +++ b/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java > @@ -234,7 +234,11 @@ public class ProviderBuilder { > Object[] args) { > try { > return (UniformRandomProvider) rng.newInstance(args); > - } catch (Exception e) { > + } catch (InvocationTargetException e) { > + throw new IllegalStateException(INTERNAL_ERROR_MSG, e); > + } catch (InstantiationException e) { > + throw new IllegalStateException(INTERNAL_ERROR_MSG, e); > + } catch (IllegalAccessException e) { > throw new IllegalStateException(INTERNAL_ERROR_MSG, e); > } > } > > -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory