mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-10 12:05:06 +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.IOException;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
import java.io.UncheckedIOException;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -66,7 +67,7 @@ public final String translate(final CharSequence input) {
|
|||||||
return writer.toString();
|
return writer.toString();
|
||||||
} catch (final IOException ioe) {
|
} catch (final IOException ioe) {
|
||||||
// this should never ever happen while writing to a StringWriter
|
// 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