/*
- * Copyright (c) 2014 Robert Varga. All rights reserved.
+ * Copyright (c) 2014 Robert Varga. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* @throws IllegalArgumentException when the supplied exception class does not pass sanity checks
* @throws SecurityException when the required constructor is not accessible
*/
- public static <X extends Exception> ReflectiveExceptionMapper<X> create(final String opName, final Class<X> exceptionType) throws SecurityException {
+ public static <X extends Exception> ReflectiveExceptionMapper<X> create(final String opName,
+ final Class<X> exceptionType) throws SecurityException {
final Constructor<X> c;
try {
c = exceptionType.getConstructor(String.class, Throwable.class);
try {
c.newInstance(opName, new Throwable());
- } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ } catch (InstantiationException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {
throw new IllegalArgumentException("Constructor " + c.getName() + " failed to pass instantiation test", e);
}