comparison src/org/eclipse/jetty/util/UrlEncoded.java @ 820:8e9db0bbf4f9

remove org.eclipse.jetty.util.log and upgrade slf4j
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 13 Sep 2016 23:13:06 -0600
parents 3428c60d7cfc
children 9d357b9e4bcb
comparison
equal deleted inserted replaced
819:17bd0b170ed6 820:8e9db0bbf4f9
27 import java.io.UnsupportedEncodingException; 27 import java.io.UnsupportedEncodingException;
28 import java.util.Iterator; 28 import java.util.Iterator;
29 import java.util.Map; 29 import java.util.Map;
30 30
31 import org.eclipse.jetty.util.Utf8Appendable.NotUtf8Exception; 31 import org.eclipse.jetty.util.Utf8Appendable.NotUtf8Exception;
32 import org.eclipse.jetty.util.log.Log; 32 import org.slf4j.Logger;
33 import org.eclipse.jetty.util.log.Logger; 33 import org.slf4j.LoggerFactory;
34 34
35 /* ------------------------------------------------------------ */ 35 /* ------------------------------------------------------------ */
36 /** Handles coding of MIME "x-www-form-urlencoded". 36 /** Handles coding of MIME "x-www-form-urlencoded".
37 * <p> 37 * <p>
38 * This class handles the encoding and decoding for either 38 * This class handles the encoding and decoding for either
51 * 51 *
52 * @see java.net.URLEncoder 52 * @see java.net.URLEncoder
53 */ 53 */
54 public class UrlEncoded extends MultiMap implements Cloneable 54 public class UrlEncoded extends MultiMap implements Cloneable
55 { 55 {
56 private static final Logger LOG = Log.getLogger(UrlEncoded.class); 56 private static final Logger LOG = LoggerFactory.getLogger(UrlEncoded.class);
57 57
58 public static final String ENCODING = System.getProperty("org.eclipse.jetty.util.UrlEncoding.charset",StringUtil.__UTF8); 58 public static final String ENCODING = System.getProperty("org.eclipse.jetty.util.UrlEncoding.charset",StringUtil.__UTF8);
59 59
60 /* ----------------------------------------------------------------- */ 60 /* ----------------------------------------------------------------- */
61 public UrlEncoded(UrlEncoded url) 61 public UrlEncoded(UrlEncoded url)
358 } 358 }
359 } 359 }
360 catch(NotUtf8Exception e) 360 catch(NotUtf8Exception e)
361 { 361 {
362 LOG.warn(e.toString()); 362 LOG.warn(e.toString());
363 LOG.debug(e); 363 LOG.debug("",e);
364 } 364 }
365 } 365 }
366 366
367 if (key != null) 367 if (key != null)
368 { 368 {
562 } 562 }
563 } 563 }
564 catch(NotUtf8Exception e) 564 catch(NotUtf8Exception e)
565 { 565 {
566 LOG.warn(e.toString()); 566 LOG.warn(e.toString());
567 LOG.debug(e); 567 LOG.debug("",e);
568 } 568 }
569 if (maxLength>=0 && (++totalLength > maxLength)) 569 if (maxLength>=0 && (++totalLength > maxLength))
570 throw new IllegalStateException("Form too large"); 570 throw new IllegalStateException("Form too large");
571 } 571 }
572 572
787 } 787 }
788 } 788 }
789 catch(NotUtf8Exception e) 789 catch(NotUtf8Exception e)
790 { 790 {
791 LOG.warn(e.toString()); 791 LOG.warn(e.toString());
792 LOG.debug(e); 792 LOG.debug("",e);
793 } 793 }
794 catch(NumberFormatException nfe) 794 catch(NumberFormatException nfe)
795 { 795 {
796 LOG.debug(nfe); 796 LOG.debug("",nfe);
797 buffer.getStringBuffer().append(Utf8Appendable.REPLACEMENT); 797 buffer.getStringBuffer().append(Utf8Appendable.REPLACEMENT);
798 } 798 }
799 } 799 }
800 else 800 else
801 { 801 {
888 n++; 888 n++;
889 } 889 }
890 } 890 }
891 catch(NumberFormatException nfe) 891 catch(NumberFormatException nfe)
892 { 892 {
893 LOG.ignore(nfe); 893 LOG.trace("",nfe);
894 ba[n++] = (byte)'?'; 894 ba[n++] = (byte)'?';
895 } 895 }
896 } 896 }
897 else 897 else
898 { 898 {