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-jxpath.git
The following commit(s) were added to refs/heads/master by this push:
new 9cc8cd7 Throw a specialized RuntimeException instead of
RuntimeException
9cc8cd7 is described below
commit 9cc8cd7e59b289146e2c34944e1f242320e605e3
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Jun 23 15:38:51 2023 -0400
Throw a specialized RuntimeException instead of
RuntimeException
---
.../java/org/apache/commons/jxpath/ri/compiler/TestFunctions.java | 2 +-
.../apache/commons/jxpath/ri/model/ExceptionPropertyTestBean.java | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/src/test/java/org/apache/commons/jxpath/ri/compiler/TestFunctions.java
b/src/test/java/org/apache/commons/jxpath/ri/compiler/TestFunctions.java
index ac5eb8a..a6ff54b 100644
--- a/src/test/java/org/apache/commons/jxpath/ri/compiler/TestFunctions.java
+++ b/src/test/java/org/apache/commons/jxpath/ri/compiler/TestFunctions.java
@@ -113,7 +113,7 @@ public class TestFunctions {
public static int count(final ExpressionContext context, final Collection
col) {
for (final Object element : col) {
if (!(element instanceof String)) {
- throw new RuntimeException("Invalid argument");
+ throw new IllegalArgumentException("Invalid argument");
}
}
return col.size();
diff --git
a/src/test/java/org/apache/commons/jxpath/ri/model/ExceptionPropertyTestBean.java
b/src/test/java/org/apache/commons/jxpath/ri/model/ExceptionPropertyTestBean.java
index 87f9ac8..29d83be 100644
---
a/src/test/java/org/apache/commons/jxpath/ri/model/ExceptionPropertyTestBean.java
+++
b/src/test/java/org/apache/commons/jxpath/ri/model/ExceptionPropertyTestBean.java
@@ -23,14 +23,14 @@ import org.apache.commons.jxpath.TestBean;
public class ExceptionPropertyTestBean {
public String getErrorString() {
- throw new RuntimeException("errorString");
+ throw new IllegalStateException("errorString");
}
public String[] getErrorStringArray() {
- throw new RuntimeException("errorStringArray");
+ throw new IllegalStateException("errorStringArray");
}
public TestBean getErrorBean() {
- throw new RuntimeException("errorBean");
+ throw new IllegalStateException("errorBean");
}
}