<action issue="LANG-969" type="fix" dev="ggregory" due-to="Matt Bishop">StringUtils.toEncodedString(byte[], Charset) needlessly throws UnsupportedEncodingException</action>
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1566489 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4b718f6e5a
commit
5feaa5fe2c
|
@ -22,6 +22,7 @@
|
|||
<body>
|
||||
|
||||
<release version="3.3" date="TBA" description="Bugfix and Feature release">
|
||||
<action issue="LANG-969" type="fix" dev="ggregory" due-to="Matt Bishop">StringUtils.toEncodedString(byte[], Charset) needlessly throws UnsupportedEncodingException</action>
|
||||
<action issue="LANG-970" type="add" dev="ggregory">Add APIs MutableBoolean setTrue() and setFalse()</action>
|
||||
<action issue="LANG-946" type="fix" dev="britter">ConstantInitializerTest fails when building with IBM JDK 7</action>
|
||||
<action issue="LANG-962" type="add" dev="ggregory">Add SerializationUtils.roundtrip(T extends Serializable) to serialize then deserialize</action>
|
||||
|
|
|
@ -7624,13 +7624,12 @@ public class StringUtils {
|
|||
* @param charset
|
||||
* the encoding to use, if null then use the platform default
|
||||
* @return a new String
|
||||
* @throws UnsupportedEncodingException
|
||||
* This exception is never thrown and should not be in the signature, it will be removed in 4.0.
|
||||
* @throws NullPointerException
|
||||
* if {@code bytes} is null
|
||||
* @since 3.2
|
||||
* @since 3.3 No longer throws {@link UnsupportedEncodingException}.
|
||||
*/
|
||||
public static String toEncodedString(byte[] bytes, Charset charset) throws UnsupportedEncodingException {
|
||||
public static String toEncodedString(byte[] bytes, Charset charset) {
|
||||
return new String(bytes, charset != null ? charset : Charset.defaultCharset());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue