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-jelly.git
commit 65a24263948814a0c3eb18d6cf4284d25af8bad5 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Jun 23 15:08:40 2023 -0400 [jelly-tags] Throw a specialized RuntimeException instead of RuntimeException --- .../java/org/apache/commons/jelly/tags/soap/StringInputStream.java | 3 ++- .../main/java/org/apache/commons/jelly/tags/threads/JellyThread.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jelly-tags/soap/src/main/java/org/apache/commons/jelly/tags/soap/StringInputStream.java b/jelly-tags/soap/src/main/java/org/apache/commons/jelly/tags/soap/StringInputStream.java index 361a92ac..0df4acf8 100644 --- a/jelly-tags/soap/src/main/java/org/apache/commons/jelly/tags/soap/StringInputStream.java +++ b/jelly-tags/soap/src/main/java/org/apache/commons/jelly/tags/soap/StringInputStream.java @@ -20,6 +20,7 @@ package org.apache.commons.jelly.tags.soap; import java.io.IOException; import java.io.InputStream; import java.io.StringReader; +import java.io.UncheckedIOException; /** * Wraps a String as an InputStream. Note that data will be lost for @@ -82,7 +83,7 @@ public class StringInputStream } catch ( IOException ioe ) { - throw new RuntimeException( ioe.getMessage() ); + throw new UncheckedIOException( ioe.getMessage(), ioe ); } } diff --git a/jelly-tags/threads/src/main/java/org/apache/commons/jelly/tags/threads/JellyThread.java b/jelly-tags/threads/src/main/java/org/apache/commons/jelly/tags/threads/JellyThread.java index 2d88caa2..1c7f0ad6 100644 --- a/jelly-tags/threads/src/main/java/org/apache/commons/jelly/tags/threads/JellyThread.java +++ b/jelly-tags/threads/src/main/java/org/apache/commons/jelly/tags/threads/JellyThread.java @@ -101,7 +101,7 @@ public class JellyThread extends Thread { */ public void waitUntilDone(long howLong) throws TimeoutException { if (Thread.currentThread() == this) { - throw new RuntimeException("This method should be called from a different thread than itself"); + throw new IllegalStateException("This method should be called from a different thread than itself"); } // wait until the calling thread can acquire the lock