Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 59147 invoked from network); 21 Jun 2006 21:29:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2006 21:29:25 -0000 Received: (qmail 81538 invoked by uid 500); 21 Jun 2006 21:29:25 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 81505 invoked by uid 500); 21 Jun 2006 21:29:25 -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 81490 invoked by uid 99); 21 Jun 2006 21:29:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 14:29:24 -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, 21 Jun 2006 14:29:24 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 247921A983A; Wed, 21 Jun 2006 14:29:04 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r416116 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util: DeleteOnExit.java OIDDatabase.java Date: Wed, 21 Jun 2006 21:29:03 -0000 To: harmony-commits@incubator.apache.org From: ndbeyer@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060621212904.247921A983A@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: ndbeyer Date: Wed Jun 21 14:29:03 2006 New Revision: 416116 URL: http://svn.apache.org/viewvc?rev=416116&view=rev Log: Generification cleanup Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/OIDDatabase.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java?rev=416116&r1=416115&r2=416116&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java Wed Jun 21 14:29:03 2006 @@ -22,7 +22,7 @@ import org.apache.harmony.kernel.vm.VM; public class DeleteOnExit { - private static Vector deleteList = new Vector(); + private static Vector deleteList = new Vector(); static { VM.deleteOnExit(); @@ -34,7 +34,7 @@ public static void deleteOnExit() { for (int i = 0; i < deleteList.size(); i++) { - String name = (String) deleteList.elementAt(i); + String name = deleteList.elementAt(i); new File(name).delete(); } } Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/OIDDatabase.java URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/OIDDatabase.java?rev=416116&r1=416115&r2=416116&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/OIDDatabase.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/OIDDatabase.java Wed Jun 21 14:29:03 2006 @@ -103,16 +103,16 @@ public String getFirstAlgorithmForOID(String oid) { String result = null; - Iterator it = this.getAllAlgorithmsForOID(oid).iterator(); + Iterator it = this.getAllAlgorithmsForOID(oid).iterator(); if (it.hasNext()) { - result = ((String) it.next()); + result = (it.next()); } return result; } - public Set getAllAlgorithmsForOID(String oid) { - Set result = null; - Iterator it = this.oids.iterator(); + public Set getAllAlgorithmsForOID(String oid) { + Set result = null; + Iterator it = this.oids.iterator(); result = getAllEquivalents(oid, it); if (result == null) { throw new IllegalArgumentException("Unknown OID : " + oid); @@ -122,16 +122,16 @@ public String getFirstOIDForAlgorithm(String algorithm) { String result = null; - Iterator it = this.getAllOIDsForAlgorithm(algorithm).iterator(); + Iterator it = this.getAllOIDsForAlgorithm(algorithm).iterator(); if (it.hasNext()) { - result = ((String) it.next()); + result = (it.next()); } return result; } - public Set getAllOIDsForAlgorithm(String algorithm) { - Set result = null; - Iterator it = this.algorithms.iterator(); + public Set getAllOIDsForAlgorithm(String algorithm) { + Set result = null; + Iterator it = this.algorithms.iterator(); result = getAllEquivalents(algorithm, it); if (result == null) { throw new IllegalArgumentException("Unsupported algorithm : " @@ -140,16 +140,16 @@ return result; } - private Set getAllEquivalents(String value, Iterator it) { + private Set getAllEquivalents(String value, Iterator it) { Set result = null; while (it.hasNext()) { - DBEntry element = (DBEntry) it.next(); + DBEntry element = it.next(); if (element.getValue().equals(value)) { - Set allMatchingDBEntries = element.getAllEquivalents(); + Set allMatchingDBEntries = element.getAllEquivalents(); result = new HashSet(); - Iterator dbIt = allMatchingDBEntries.iterator(); + Iterator dbIt = allMatchingDBEntries.iterator(); while (dbIt.hasNext()) { - DBEntry matchingEntry = (DBEntry) dbIt.next(); + DBEntry matchingEntry = dbIt.next(); result.add(matchingEntry.getValue()); } } @@ -158,9 +158,9 @@ } static class DBEntry { - private List equivalents = new LinkedList(); + private final List equivalents = new LinkedList(); - private String value; + private final String value; DBEntry(String value) { this.value = value; @@ -174,8 +174,8 @@ return this.value; } - Set getAllEquivalents() { - return new HashSet(this.equivalents); + Set getAllEquivalents() { + return new HashSet(this.equivalents); } } }