This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-dbutils.git
The following commit(s) were added to refs/heads/master by this push: new 8dac4c6 AbstractQueryRunner.fillStatementWithBean(PreparedStatement, Object, String...) now throws IllegalArgumentException instead of RuntimeException 8dac4c6 is described below commit 8dac4c69fbba4d187b0465217f57443efc5c47dd Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Sep 20 17:05:58 2024 -0400 AbstractQueryRunner.fillStatementWithBean(PreparedStatement, Object, String...) now throws IllegalArgumentException instead of RuntimeException --- src/changes/changes.xml | 1 + src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index d3f7712..9443ab9 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -51,6 +51,7 @@ The <action> type attribute can be add,update,fix,remove. <action dev="ggregory" type="fix" due-to="Gary Gregory">Fix StatementConfiguration SpotBugs CT: Be wary of letting constructors throw exceptions. (CT_CONSTRUCTOR_THROW).</action> <action dev="ggregory" type="fix" due-to="Gary Gregory">ResultSetIterator.next() does not check if it is already at the end of the result set (SpotBugs CheckResultSet).</action> <action type="fix" dev="ggregory" due-to="Gary Gregory">Replace BasicRowProcessor use of Locale.ENGLISH with Locale.ROOT.</action> + <action type="fix" dev="ggregory" due-to="Gary Gregory">AbstractQueryRunner.fillStatementWithBean(PreparedStatement, Object, String...) now throws IllegalArgumentException instead of RuntimeException.</action> <!-- ADD --> <!-- UPDATE --> <action dev="ggregory" type="update" due-to="Gary Gregory">Bump Java from 8 to 11.</action> diff --git a/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java b/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java index cca0f5e..1e93975 100644 --- a/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java +++ b/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java @@ -409,7 +409,7 @@ public abstract class AbstractQueryRunner { try { descriptors = Introspector.getBeanInfo(bean.getClass()).getPropertyDescriptors(); } catch (final IntrospectionException e) { - throw new RuntimeException("Couldn't introspect bean " + bean.getClass().toString(), e); + throw new IllegalArgumentException("Couldn't introspect bean " + bean.getClass().toString(), e); } final PropertyDescriptor[] sorted = new PropertyDescriptor[propertyNames.length]; for (int i = 0; i < propertyNames.length; i++) {