src/java.base/share/classes/java/net/URLDecoder.java
changeset 53018 8bf9268df0e2
parent 48252 77b88d8f8380
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   131      *             named character encoding is not supported
   131      *             named character encoding is not supported
   132      * @see URLEncoder#encode(java.lang.String, java.lang.String)
   132      * @see URLEncoder#encode(java.lang.String, java.lang.String)
   133      * @since 1.4
   133      * @since 1.4
   134      */
   134      */
   135     public static String decode(String s, String enc) throws UnsupportedEncodingException {
   135     public static String decode(String s, String enc) throws UnsupportedEncodingException {
   136         if (enc.length() == 0) {
   136         if (enc.isEmpty()) {
   137             throw new UnsupportedEncodingException ("URLDecoder: empty string enc parameter");
   137             throw new UnsupportedEncodingException ("URLDecoder: empty string enc parameter");
   138         }
   138         }
   139 
   139 
   140         try {
   140         try {
   141             Charset charset = Charset.forName(enc);
   141             Charset charset = Charset.forName(enc);