This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-utils. See http://git.nuiton.org/nuiton-utils.git commit 73c480d3cfa4b44f91ff93d997bea5e3879e4b1c Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Aug 19 14:01:16 2015 +0200 Catch more exception while binding (fixes #3758) --- src/main/java/org/nuiton/util/beans/Binder.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/nuiton/util/beans/Binder.java b/src/main/java/org/nuiton/util/beans/Binder.java index befc994..d85b150 100644 --- a/src/main/java/org/nuiton/util/beans/Binder.java +++ b/src/main/java/org/nuiton/util/beans/Binder.java @@ -29,7 +29,6 @@ import org.nuiton.util.ObjectUtil; import java.beans.PropertyDescriptor; import java.io.Serializable; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; @@ -217,12 +216,8 @@ public class Binder<I, O> implements Serializable { if (include) { result.put(sourceProperty, read); } - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { - throw new RuntimeException(e); - } catch (InstantiationException e) { - throw new RuntimeException(e); + } catch (Exception e) { + throw new RuntimeException("Could not obtain property: " + sourceProperty, e); } } return result; @@ -286,7 +281,7 @@ public class Binder<I, O> implements Serializable { Method writeMethod = getModel().getTargetWriteMethod(propertyName); try { writeMethod.invoke(target, propertyValue); - } catch (IllegalAccessException | InvocationTargetException e) { + } catch (Exception e) { throw new RuntimeException( "Could not set property [" + target.getClass().getName() + ":" + -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.