A DESCRIPTION OF THE REQUEST :
Right now if you want to URLEncode a string you need to pass a charset as a string which makes you have to catch an exception.
JUSTIFICATION :
There is no reason to have to deal with an exception if the encode method can take a Charset. It can make the code design a bit nicer, so it's just a nice enhancement.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
URLEncoder.encode(String input, Charset charset) url encodes the input with the charset without throwing an exception.
ACTUAL -
We currently have to catch an exception