Resolved default charset warning in jetty-util for #2206
Ignored warning in B64Code US-ASCII in UnixCrypt Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
be64f322ad
commit
cf5b501254
|
@ -261,6 +261,7 @@ public class B64Code
|
|||
* @throws IllegalArgumentException if the input is not a valid
|
||||
* B64 encoding.
|
||||
*/
|
||||
@SuppressWarnings("DefaultCharset")
|
||||
public static String decode(String encoded,String charEncoding)
|
||||
{
|
||||
byte[] decoded=decode(encoded);
|
||||
|
@ -279,6 +280,7 @@ public class B64Code
|
|||
* @throws IllegalArgumentException if the input is not a valid
|
||||
* B64 encoding.
|
||||
*/
|
||||
@SuppressWarnings("DefaultCharset")
|
||||
public static String decode(String encoded, Charset charEncoding)
|
||||
{
|
||||
byte[] decoded=decode(encoded);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package org.eclipse.jetty.util.security;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
|
@ -444,7 +445,7 @@ public class UnixCrypt
|
|||
rsltblock >>= 6;
|
||||
}
|
||||
|
||||
return new String(cryptresult, 0, 13);
|
||||
return new String(cryptresult, 0, 13, StandardCharsets.US_ASCII);
|
||||
}
|
||||
|
||||
public static void main(String[] arg)
|
||||
|
|
Loading…
Reference in New Issue