aaberg/sql2o — Issue #5: Crash when setting int values on beans
Author: tha022
Created: 2011-12-20 14:15:33+00:00
State: open

crashes if the POJO has a int field where we try to set a null value

public void setProperty(Object obj, Object value) {
try {
this.method.invoke(obj, value);
} catch (IllegalAccessException e) {
throw new Sql2oException("error while calling setter method with name " + method.getName() + " on class " + obj.getClass().toString(), e);
} catch (InvocationTargetException e) {
throw new Sql2oException("error while calling setter method with name " + method.getName() + " on class " + obj.getClass().toString(), e);
}
}