Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 45977 invoked from network); 31 May 2006 14:33:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 May 2006 14:33:36 -0000 Received: (qmail 12614 invoked by uid 500); 31 May 2006 14:33:35 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 12510 invoked by uid 500); 31 May 2006 14:33:35 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 12499 invoked by uid 99); 31 May 2006 14:33:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2006 07:33:35 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2006 07:33:34 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 4921C1A983A; Wed, 31 May 2006 07:33:14 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r410542 - in /incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset: Charset.java spi/CharsetProvider.java Date: Wed, 31 May 2006 14:33:13 -0000 To: harmony-commits@incubator.apache.org From: tellison@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060531143314.4921C1A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: tellison Date: Wed May 31 07:33:13 2006 New Revision: 410542 URL: http://svn.apache.org/viewvc?rev=410542&view=rev Log: Generics uplift for j.n.c.Charset and j.n.c.s.CharsetProvider Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/spi/CharsetProvider.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java?rev=410542&r1=410541&r2=410542&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/Charset.java Wed May 31 07:33:13 2006 @@ -118,16 +118,19 @@ private final String canonicalName; // the aliases set - private final HashSet aliasesSet; + private final HashSet aliasesSet; // cached Charset table - private static HashMap cachedCharsetTable = new HashMap(); + private static HashMap cachedCharsetTable = + new HashMap(); // cached CharsetDecoder table - private static HashMap cachedCharsetDecoderTable = new HashMap(); + private static HashMap cachedCharsetDecoderTable = + new HashMap(); // cached CharsetEncoder table - private static HashMap cachedCharsetEncoderTable = new HashMap(); + private static HashMap cachedCharsetEncoderTable = + new HashMap(); /* * ------------------------------------------------------------------- @@ -177,7 +180,7 @@ checkCharsetName(canonicalName); this.canonicalName = canonicalName; // check each aliase and put into a set - this.aliasesSet = new HashSet(); + this.aliasesSet = new HashSet(); if (null != aliases) { for (int i = 0; i < aliases.length; i++) { checkCharsetName(aliases[i]); @@ -339,7 +342,7 @@ * @return an unmodifiable map of all available charsets supported by the * runtime */ - public static SortedMap availableCharsets() { + public static SortedMap availableCharsets() { // Initialize the built-in charsets map cache if necessary if (null == _builtInCharsets) { synchronized (Charset.class) { @@ -790,7 +793,7 @@ /** * A comparator that ignores case. */ - static class IgnoreCaseComparator implements Comparator { + static class IgnoreCaseComparator implements Comparator { // the singleton private static Comparator c = new IgnoreCaseComparator(); @@ -812,9 +815,7 @@ /* * Compares two strings ignoring case. */ - public int compare(Object obj1, Object obj2) { - String s1 = (String) obj1; - String s2 = (String) obj2; + public int compare(String s1, String s2) { return s1.compareToIgnoreCase(s2); } } Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/spi/CharsetProvider.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/spi/CharsetProvider.java?rev=410542&r1=410541&r2=410542&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/spi/CharsetProvider.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/src/main/java/java/nio/charset/spi/CharsetProvider.java Wed May 31 07:33:13 2006 @@ -46,7 +46,7 @@ * * @return the iterator. */ - public abstract Iterator charsets(); + public abstract Iterator charsets(); /** * Answers the named charset.