commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch: FYI: some minor cleanups


From: Tom Tromey
Subject: Patch: FYI: some minor cleanups
Date: 23 Apr 2004 14:09:33 -0600

I'm checking this in.
This is just some minor cleanups found by the Eclipse compiler.

Tom

Index: ChangeLog
===================================================================
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.2101
diff -u -r1.2101 ChangeLog
--- ChangeLog   23 Apr 2004 19:38:16 -0000      1.2101
+++ ChangeLog   23 Apr 2004 20:15:48 -0000
@@ -1,5 +1,20 @@
 2004-04-23  Tom Tromey  <address@hidden>
 
+       * java/text/Format.java: Cleaned up imports.
+       * java/text/DecimalFormat.java: Cleaned up imports.
+       * java/security/SecureRandom.java: Cleaned up imports.
+       (SecureRandom): Removed unused variable.
+       * java/security/UnresolvedPermission.java: Cleaned up imports.
+       * java/util/Date.java (parse): Removed unused variable.
+       * java/util/ResourceBundle.java: Cleaned up imports.
+       (getBundle): Removed unused variable.
+       (tryBundle): Likewise.
+       * java/util/regex/Pattern.java (Pattern): Removed unused constructor.
+       * java/util/zip/DeflaterHuffman.java (buildCodes): Removed unused
+       variable.
+
+2004-04-23  Tom Tromey  <address@hidden>
+
        * javax/naming/CompoundName.java (endsWith): Look at correct
        element of source name.
 
Index: java/text/DecimalFormat.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/text/DecimalFormat.java,v
retrieving revision 1.12
diff -u -r1.12 DecimalFormat.java
--- java/text/DecimalFormat.java        1 Apr 2004 12:28:12 -0000       1.12
+++ java/text/DecimalFormat.java        23 Apr 2004 20:16:11 -0000
@@ -37,12 +37,10 @@
 
 package java.text;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.util.Currency;
 import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.io.ObjectInputStream;
-import java.io.IOException;
 
 /**
  * @author Tom Tromey <address@hidden>
Index: java/text/Format.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/text/Format.java,v
retrieving revision 1.9
diff -u -r1.9 Format.java
--- java/text/Format.java       17 Apr 2004 18:37:47 -0000      1.9
+++ java/text/Format.java       23 Apr 2004 20:16:11 -0000
@@ -38,10 +38,6 @@
 
 package java.text;
 
-import java.util.Set;
-import java.util.Map;
-import java.util.HashSet;
-import java.util.HashMap;
 import java.io.Serializable;
 
 /**
Index: java/util/Date.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/Date.java,v
retrieving revision 1.16
diff -u -r1.16 Date.java
--- java/util/Date.java 6 Jan 2004 09:40:31 -0000       1.16
+++ java/util/Date.java 23 Apr 2004 20:16:11 -0000
@@ -460,7 +460,6 @@
                        int curYear = 1900 + new Date().getYear();
                        int firstYear = curYear - 80;
                        year = firstYear / 100 * 100 + num;
-                       int yx = year;
                        if (year < firstYear)
                          year += 100;
                      }
Index: java/util/ResourceBundle.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/ResourceBundle.java,v
retrieving revision 1.22
diff -u -r1.22 ResourceBundle.java
--- java/util/ResourceBundle.java       17 Apr 2004 19:23:19 -0000      1.22
+++ java/util/ResourceBundle.java       23 Apr 2004 20:16:12 -0000
@@ -44,7 +44,6 @@
 import java.io.IOException;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import gnu.classpath.Configuration;
 
 /**
  * A resource bundle contains locale-specific data. If you need localized
@@ -402,7 +401,6 @@
     else if (cache.containsKey(name))
       {
        Reference ref = (Reference) cache.get(name);
-       ResourceBundle result = null;
        // If REF is null, that means that we added a `null' value to
        // the hash map.  That means we failed to find the bundle
        // previously, and we cached that fact.  The JDK does this, so
@@ -497,7 +495,6 @@
     if (cache.containsKey(localizedName))
       {
        Reference ref = (Reference) cache.get(localizedName);
-       ResourceBundle result = null;
        // If REF is null, that means that we added a `null' value to
        // the hash map.  That means we failed to find the bundle
        // previously, and we cached that fact.  The JDK does this, so
Index: java/util/regex/Pattern.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/regex/Pattern.java,v
retrieving revision 1.7
diff -u -r1.7 Pattern.java
--- java/util/regex/Pattern.java        21 Apr 2004 15:21:34 -0000      1.7
+++ java/util/regex/Pattern.java        23 Apr 2004 20:16:12 -0000
@@ -67,12 +67,6 @@
 
   private final RE re;
 
-  private Pattern (String regex)
-    throws PatternSyntaxException
-  {
-    this (regex, 0);
-  }
-
   private Pattern (String regex, int flags)
     throws PatternSyntaxException
   {
Index: java/util/zip/DeflaterHuffman.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/zip/DeflaterHuffman.java,v
retrieving revision 1.3
diff -u -r1.3 DeflaterHuffman.java
--- java/util/zip/DeflaterHuffman.java  22 Jan 2002 22:27:02 -0000      1.3
+++ java/util/zip/DeflaterHuffman.java  23 Apr 2004 20:16:13 -0000
@@ -115,7 +115,6 @@
     }
 
     public void buildCodes() {
-      int numSymbols = freqs.length;
       int[] nextCode = new int[maxLength];
       int code = 0;
       codes = new short[freqs.length];
Index: java/security/UnresolvedPermission.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/UnresolvedPermission.java,v
retrieving revision 1.6
diff -u -r1.6 UnresolvedPermission.java
--- java/security/UnresolvedPermission.java     29 Mar 2002 08:30:51 -0000      
1.6
+++ java/security/UnresolvedPermission.java     23 Apr 2004 20:16:10 -0000
@@ -37,7 +37,6 @@
 
 package java.security;
 
-import java.io.Serializable;
 // All uses of Certificate in this file refer to the one in the listed
 // package, not this one.
 import java.security.cert.Certificate;
Index: java/security/SecureRandom.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/SecureRandom.java,v
retrieving revision 1.13
diff -u -r1.13 SecureRandom.java
--- java/security/SecureRandom.java     10 May 2003 05:58:28 -0000      1.13
+++ java/security/SecureRandom.java     23 Apr 2004 20:16:10 -0000
@@ -37,12 +37,11 @@
 
 package java.security;
 
-import java.io.Serializable;
-import java.util.Random;
-import java.util.Enumeration;
-
 import gnu.java.security.Engine;
 
+import java.util.Enumeration;
+import java.util.Random;
+
 /**
  * An interface to a cryptographically secure pseudo-random number
  * generator (PRNG). Random (or at least unguessable) numbers are used
@@ -94,7 +93,7 @@
     String key;
 
     String classname = null;
-    int i, flag = 0;
+    int i;
     Enumeration e;
     for (i = 0; i < p.length; i++)
       {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]