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 0b3a2c8 Throw a RuntimeException subclass instead of RuntimeException
0b3a2c8 is described below
commit 0b3a2c8744af6ba510c8d2b31d1b0b44a6232a96
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jul 6 15:20:55 2023 -0400
Throw a RuntimeException subclass instead of RuntimeException
---
.../java/org/apache/commons/dbutils/AbstractQueryRunner.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
b/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
index fd433e3..a904e5c 100644
--- a/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
+++ b/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
@@ -398,17 +398,14 @@ public abstract class AbstractQueryRunner {
Object value = null;
final Method method = property.getReadMethod();
if (method == null) {
- throw new RuntimeException("No read method for bean property "
- + bean.getClass() + " " + property.getName());
+ throw new IllegalArgumentException("No read method for bean
property " + bean.getClass() + " " + property.getName());
}
try {
value = method.invoke(bean);
} catch (final IllegalArgumentException e) {
- throw new RuntimeException(
- "Couldn't invoke method with 0 arguments: " + method,
e);
+ throw new IllegalArgumentException("Couldn't invoke method
with 0 arguments: " + method, e);
} catch (final InvocationTargetException | IllegalAccessException
e) {
- throw new RuntimeException("Couldn't invoke method: " + method,
- e);
+ throw new IllegalArgumentException("Couldn't invoke method: "
+ method, e);
}
params[i] = value;
}