- 
    Enhancement 
- 
    Resolution: Duplicate
- 
     P4 P4
- 
    None
- 
    8, 9, 10
                    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
            
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
- duplicates
- 
                    JDK-8190577 Add Constructors/Methods that take a Charset parameter to APIs in java.io, java.net, java.nio and java.util -           
- Closed
 
-