Author: bago
Date: Sat Jan 2 21:46:48 2010
New Revision: 895299
URL: http://svn.apache.org/viewvc?rev=895299&view=rev
Log:
Removed commons-loggin from CharsetUtil. Removed unused static method
(MIME4J-159)
Modified:
james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/util/CharsetUtil.java
Modified:
james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/util/CharsetUtil.java
URL:
http://svn.apache.org/viewvc/james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/util/CharsetUtil.java?rev=895299&r1=895298&r2=895299&view=diff
==============================================================================
---
james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/util/CharsetUtil.java
(original)
+++
james/mime4j/branches/cycleclean/core/src/main/java/org/apache/james/mime4j/util/CharsetUtil.java
Sat Jan 2 21:46:48 2010
@@ -20,16 +20,11 @@
package org.apache.james.mime4j.util;
import java.io.UnsupportedEncodingException;
-import java.nio.charset.IllegalCharsetNameException;
-import java.nio.charset.UnsupportedCharsetException;
import java.util.HashMap;
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
/**
* Utility class for working with character sets. It is somewhat similar to
* the Java 1.4 <code>java.nio.charset.Charset</code> class but knows many
@@ -788,7 +783,6 @@
* </table>
*/
public class CharsetUtil {
- private static Log log = LogFactory.getLog(CharsetUtil.class);
private static class Charset implements Comparable<Charset> {
private String canonical = null;
@@ -1044,13 +1038,6 @@
}
}
}
-
- if (log.isDebugEnabled()) {
- log.debug("Character sets which support decoding: "
- + decodingSupported);
- log.debug("Character sets which support encoding: "
- + encodingSupported);
- }
}
/** carriage return - line feed sequence */
@@ -1213,25 +1200,6 @@
return null;
}
- public static java.nio.charset.Charset getCharset(String charsetName) {
- String defaultCharset = "ISO-8859-1";
-
- // Use the default chareset if given charset is null
- if(charsetName == null) charsetName = defaultCharset;
-
- try {
- return java.nio.charset.Charset.forName(charsetName);
- } catch (IllegalCharsetNameException e) {
- log.info("Illegal charset " + charsetName + ", fallback to " +
defaultCharset + ": " + e);
- // Use default charset on exception
- return java.nio.charset.Charset.forName(defaultCharset);
- } catch (UnsupportedCharsetException ex) {
- log.info("Unsupported charset " + charsetName + ", fallback to " +
defaultCharset + ": " + ex);
- // Use default charset on exception
- return java.nio.charset.Charset.forName(defaultCharset);
- }
-
- }
/*
* Uncomment the code below and run the main method to regenerate the
* Javadoc table above when the known charsets change.