You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/15 23:12:12 UTC
[commons-text] 03/11: [Spotbugs 4.7.0] More precise exception handling, use UncheckedIOException instead of RuntimeException
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-text.git
commit d30c70c007e1dacbcccf6a24f43b6f5dc5ef529a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun May 15 18:41:28 2022 -0400
[Spotbugs 4.7.0] More precise exception handling, use
UncheckedIOException instead of RuntimeException
---
.../java/org/apache/commons/text/translate/CharSequenceTranslator.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java b/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java
index 109c768d..b1b56f4b 100644
--- a/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java
+++ b/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java
@@ -18,6 +18,7 @@ package org.apache.commons.text.translate;
import java.io.IOException;
import java.io.StringWriter;
+import java.io.UncheckedIOException;
import java.io.Writer;
import java.util.Locale;
@@ -66,7 +67,7 @@ public abstract class CharSequenceTranslator {
return writer.toString();
} catch (final IOException ioe) {
// this should never ever happen while writing to a StringWriter
- throw new RuntimeException(ioe);
+ throw new UncheckedIOException(ioe);
}
}