mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-09 19:45:01 +00:00
Better internal exception handling.
This commit is contained in:
parent
aae5a3522f
commit
7ee27499f8
@ -18,6 +18,7 @@
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.io.Writer;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
@ -66,7 +67,7 @@ public final String translate(final CharSequence input) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user