From 67d12a0839933162657d7c0ae43e436ea6895102 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Tue, 27 Feb 2018 12:12:40 +1100 Subject: [PATCH] Updates from review Signed-off-by: Lachlan Roberts --- .../src/main/java/org/eclipse/jetty/util/B64Code.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java b/jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java index 078b8f8e4f5..6e9d7d8599b 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java @@ -255,13 +255,14 @@ public class B64Code *

Unlike {@link #decode(char[])}, extra whitespace is ignored. * @param encoded String to decode. * @param charEncoding String representing the character encoding - * used to map the decoded bytes into a String. + * used to map the decoded bytes into a String. If null + * the platforms default charset is used. * @return String decoded byte array. * @throws UnsupportedCharsetException if the encoding is not supported * @throws IllegalArgumentException if the input is not a valid * B64 encoding. */ - @SuppressWarnings("DefaultCharset") + @SuppressWarnings("DefaultCharset") public static String decode(String encoded,String charEncoding) { byte[] decoded=decode(encoded); @@ -275,12 +276,13 @@ public class B64Code *

Unlike {@link #decode(char[])}, extra whitespace is ignored. * @param encoded String to decode. * @param charEncoding Character encoding - * used to map the decoded bytes into a String. + * used to map the decoded bytes into a String. If null + * the platforms default charset is used. * @return String decoded byte array. * @throws IllegalArgumentException if the input is not a valid * B64 encoding. */ - @SuppressWarnings("DefaultCharset") + @SuppressWarnings("DefaultCharset") public static String decode(String encoded, Charset charEncoding) { byte[] decoded=decode(encoded);