Remove unused exception from deprecated StringUtils.toString(byte[],

String)
This commit is contained in:
Gary Gregory 2024-08-24 14:38:25 -04:00
parent 3be74c40e0
commit d2eff05cd0
2 changed files with 2 additions and 3 deletions

View File

@ -52,6 +52,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate static RandomStringUtils.random*() methods in favor or .secure() and .insecure() versions.</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">RandomUtils.secure() now uses SecureRandom() instead of SecureRandom.getInstanceStrong().</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">RandomStringUtils.secure() now uses SecureRandom() instead of SecureRandom.getInstanceStrong().</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">Remove unused exception from deprecated StringUtils.toString(byte[], String).</action>
<!-- ADD -->
<action type="add" dev="ggregory" due-to="Gary Gregory">Make RandomUtils.insecure() public.</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">Add RandomUtils.secureStrong().</action>

View File

@ -9031,15 +9031,13 @@ public class StringUtils {
* @param charsetName
* the encoding to use, if null then use the platform default
* @return a new String
* @throws UnsupportedEncodingException
* Never thrown
* @throws NullPointerException
* if the input is null
* @deprecated use {@link StringUtils#toEncodedString(byte[], Charset)} instead of String constants in your code
* @since 3.1
*/
@Deprecated
public static String toString(final byte[] bytes, final String charsetName) throws UnsupportedEncodingException {
public static String toString(final byte[] bytes, final String charsetName) {
return new String(bytes, Charsets.toCharset(charsetName));
}