You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2007/08/01 14:29:54 UTC
svn commit: r561783 -
/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java
Author: tellison
Date: Wed Aug 1 05:29:54 2007
New Revision: 561783
URL: http://svn.apache.org/viewvc?view=rev&rev=561783
Log:
Fix incorrect method signatures as described in
HARMONY-4547 ([classlib][nio_char][java6]Remove exceptions throws declaration from methods' signature)
Modified:
harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java
Modified: harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java?view=diff&rev=561783&r1=561782&r2=561783
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java Wed Aug 1 05:29:54 2007
@@ -73,52 +73,33 @@
* </p>
*
* @see java.nio.charset.spi.CharsetProvider
- *
*/
public abstract class Charset implements Comparable<Charset> {
/*
- * --------------------------------------------------------------------
- * Constants
- * --------------------------------------------------------------------
- */
-
- /*
- * the name of configuration files where charset provider class names can be
+ * The name of configuration files where charset provider class names can be
* specified.
*/
private static final String PROVIDER_CONFIGURATION_FILE_NAME = "META-INF/services/java.nio.charset.spi.CharsetProvider"; //$NON-NLS-1$
/*
- * the encoding of configuration files
+ * The encoding of configuration files
*/
private static final String PROVIDER_CONFIGURATION_FILE_ENCODING = "UTF-8"; //$NON-NLS-1$
/*
- * the comment string used in configuration files
+ * The comment string used in configuration files
*/
private static final String PROVIDER_CONFIGURATION_FILE_COMMENT = "#"; //$NON-NLS-1$
private static ClassLoader systemClassLoader;
- /*
- * --------------------------------------------------------------------
- * Class variables
- * --------------------------------------------------------------------
- */
-
// built in provider instance, assuming thread-safe
private static CharsetProviderImpl _builtInProvider = null;
// cached built in charsets
private static TreeMap<String, Charset> _builtInCharsets = null;
- /*
- * --------------------------------------------------------------------
- * Instance variables
- * --------------------------------------------------------------------
- */
-
private final String canonicalName;
// the aliases set
@@ -135,14 +116,10 @@
private CharsetEncoder cachedEncoder = null;
private CharsetDecoder cachedDecoder = null;
- /*
- * -------------------------------------------------------------------
- * Global initialization
- * -------------------------------------------------------------------
- */
+
static {
/*
- * create built-in charset provider even if no privilege to access
+ * Create built-in charset provider even if no privilege to access
* charset provider.
*/
_builtInProvider = AccessController
@@ -153,12 +130,6 @@
});
}
- /*
- * -------------------------------------------------------------------
- * Constructors
- * -------------------------------------------------------------------
- */
-
/**
* Constructs a <code>Charset</code> object. Duplicated aliases are
* ignored.
@@ -171,11 +142,8 @@
* on an illegal value being supplied for either
* <code>canonicalName</code> or for any element of
* <code>aliases</code>.
- *
*/
- protected Charset(String canonicalName, String[] aliases)
- throws IllegalCharsetNameException {
- // throw IllegalArgumentException if name is null
+ protected Charset(String canonicalName, String[] aliases) {
if (null == canonicalName) {
throw new NullPointerException();
}
@@ -193,12 +161,6 @@
}
/*
- * -------------------------------------------------------------------
- * Methods
- * -------------------------------------------------------------------
- */
-
- /*
* Checks whether a character is a special character that can be used in
* charset names, other than letters and digits.
*/
@@ -557,8 +519,7 @@
* @throws UnsupportedCharsetException
* If the desired charset is not supported by this runtime.
*/
- public static Charset forName(String charsetName)
- throws IllegalCharsetNameException, UnsupportedCharsetException {
+ public static Charset forName(String charsetName) {
Charset c = forNameInternal(charsetName);
if (null == c) {
throw new UnsupportedCharsetException(charsetName);
@@ -575,8 +536,7 @@
* @throws IllegalCharsetNameException
* If the specified charset name is illegal.
*/
- public static boolean isSupported(String charsetName)
- throws IllegalCharsetNameException {
+ public static boolean isSupported(String charsetName) {
Charset cs = forNameInternal(charsetName);
return (null != cs);
}