From: Tom Tromey Date: Mon, 3 May 2004 19:52:29 +0000 (+0000) Subject: URLStreamHandler.java (toExternalForm): Removed unused variables. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b68f0bf7ec0b3e1fa43ca8b764c39c43e27bba7;p=gcc.git URLStreamHandler.java (toExternalForm): Removed unused variables. 2004-05-03 Tom Tromey * java/net/URLStreamHandler.java (toExternalForm): Removed unused variables. unused constructor. * java/math/BigDecimal.java (divide): Removed unused variable. * java/lang/Throwable.java: Cleaned up imports. * java/lang/ClassLoader.java: Cleaned up imports. * java/io/FilePermission.java (implies): Removed unused variable. * java/awt/TextComponent.java: Removed unused import. * gnu/java/util/prefs/NodeReader.java: Cleaned up imports. * gnu/java/util/DoubleEnumeration.java: Removed unused import. * gnu/java/text/WordBreakIterator.java: Removed unused import. * gnu/java/text/SentenceBreakIterator.java: Removed unused import. * gnu/java/text/LineBreakIterator.java: Removed unused import. * gnu/java/text/CharacterBreakIterator.java: Removed unused import. * gnu/java/security/provider/DSAKeyPairGenerator.java: Cleaned up imports. * gnu/java/security/der/DERWriter.java: Cleaned up imports. * gnu/java/nio/charset/UTF_16Decoder.java (put): Removed unused method. * gnu/java/nio/SocketChannelImpl.java: Cleaned up imports. * gnu/java/nio/FileLockImpl.java: Cleaned up imports. * gnu/java/io/Base64InputStream.java: Cleaned up imports. * gnu/java/beans/info/ComponentBeanInfo.java: Cleaned up imports. * gnu/classpath/ServiceFactory.java: Cleaned up imports. (lookupProviders): Removed unused variable. (loadNextServiceProvider): Likewise. * gnu/java/beans/BeanInfoEmbryo.java: Cleaned up imports. From-SVN: r81450 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 68af3d44ada..cce65c54b2e 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,36 @@ +2004-05-03 Tom Tromey + + * java/net/URLStreamHandler.java (toExternalForm): Removed + unused variables. + unused constructor. + * java/math/BigDecimal.java (divide): Removed unused variable. + * java/lang/Throwable.java: Cleaned up imports. + * java/lang/ClassLoader.java: Cleaned up imports. + * java/io/FilePermission.java (implies): Removed unused + variable. + * java/awt/TextComponent.java: Removed unused import. + * gnu/java/util/prefs/NodeReader.java: Cleaned up imports. + * gnu/java/util/DoubleEnumeration.java: Removed unused import. + * gnu/java/text/WordBreakIterator.java: Removed unused import. + * gnu/java/text/SentenceBreakIterator.java: Removed unused + import. + * gnu/java/text/LineBreakIterator.java: Removed unused import. + * gnu/java/text/CharacterBreakIterator.java: Removed + unused import. + * gnu/java/security/provider/DSAKeyPairGenerator.java: + Cleaned up imports. + * gnu/java/security/der/DERWriter.java: Cleaned up imports. + * gnu/java/nio/charset/UTF_16Decoder.java (put): Removed + unused method. + * gnu/java/nio/SocketChannelImpl.java: Cleaned up imports. + * gnu/java/nio/FileLockImpl.java: Cleaned up imports. + * gnu/java/io/Base64InputStream.java: Cleaned up imports. + * gnu/java/beans/info/ComponentBeanInfo.java: Cleaned up imports. + * gnu/classpath/ServiceFactory.java: Cleaned up imports. + (lookupProviders): Removed unused variable. + (loadNextServiceProvider): Likewise. + * gnu/java/beans/BeanInfoEmbryo.java: Cleaned up imports. + 2004-05-03 Michael Koch Fixes PR libgcj/14695: diff --git a/libjava/gnu/classpath/ServiceFactory.java b/libjava/gnu/classpath/ServiceFactory.java index 0e81cf74b38..5d1493414d0 100644 --- a/libjava/gnu/classpath/ServiceFactory.java +++ b/libjava/gnu/classpath/ServiceFactory.java @@ -38,11 +38,9 @@ exception statement from your version. */ package gnu.classpath; -import java.io.InputStream; -import java.io.IOException; import java.io.BufferedReader; +import java.io.IOException; import java.io.InputStreamReader; -import java.io.Reader; import java.net.URL; import java.security.AccessControlContext; import java.security.AccessController; @@ -52,8 +50,8 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.logging.Level; -import java.util.logging.Logger; import java.util.logging.LogRecord; +import java.util.logging.Logger; /** @@ -227,7 +225,6 @@ public final class ServiceFactory public static Iterator lookupProviders(Class spi, ClassLoader loader) { - InputStream stream; String resourceName; Enumeration urls; @@ -407,7 +404,6 @@ public final class ServiceFactory private Object loadNextServiceProvider() { String line; - Class klass; if (reader == null) advanceReader(); diff --git a/libjava/gnu/java/awt/BitwiseXORComposite.java b/libjava/gnu/java/awt/BitwiseXORComposite.java index 675c225bbfa..dd4f015b42a 100644 --- a/libjava/gnu/java/awt/BitwiseXORComposite.java +++ b/libjava/gnu/java/awt/BitwiseXORComposite.java @@ -232,7 +232,7 @@ public class BitwiseXORComposite WritableRaster dstOut) { int aX, bX, dstX, aY, bY, dstY, width, height; - int xorPixel, transferType; + int xorPixel; int[] srcLine, dstLine; aX = src.getMinX(); diff --git a/libjava/gnu/java/beans/BeanInfoEmbryo.java b/libjava/gnu/java/beans/BeanInfoEmbryo.java index 473aa790cba..16738fe6048 100644 --- a/libjava/gnu/java/beans/BeanInfoEmbryo.java +++ b/libjava/gnu/java/beans/BeanInfoEmbryo.java @@ -38,10 +38,17 @@ exception statement from your version. */ package gnu.java.beans; -import java.beans.*; -import java.util.*; -import gnu.java.lang.*; -import java.lang.reflect.*; +import java.beans.BeanDescriptor; +import java.beans.BeanInfo; +import java.beans.EventSetDescriptor; +import java.beans.IndexedPropertyDescriptor; +import java.beans.MethodDescriptor; +import java.beans.PropertyDescriptor; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Vector; /** ** A BeanInfoEmbryo accumulates information about a Bean diff --git a/libjava/gnu/java/beans/info/ComponentBeanInfo.java b/libjava/gnu/java/beans/info/ComponentBeanInfo.java index fce476149a9..877a18d65d2 100644 --- a/libjava/gnu/java/beans/info/ComponentBeanInfo.java +++ b/libjava/gnu/java/beans/info/ComponentBeanInfo.java @@ -38,8 +38,9 @@ exception statement from your version. */ package gnu.java.beans.info; -import gnu.java.beans.*; -import java.beans.*; +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; /** BeanInfo class for java.awt.Component. ** This provides a few properties, but that's diff --git a/libjava/gnu/java/io/Base64InputStream.java b/libjava/gnu/java/io/Base64InputStream.java index 0879e945962..3780e952837 100644 --- a/libjava/gnu/java/io/Base64InputStream.java +++ b/libjava/gnu/java/io/Base64InputStream.java @@ -39,9 +39,8 @@ exception statement from your version. */ package gnu.java.io; import java.io.FilterInputStream; -import java.io.InputStream; import java.io.IOException; -import java.io.EOFException; +import java.io.InputStream; /** * A filter input stream that decodes data encoded in the Base-64 diff --git a/libjava/gnu/java/nio/FileLockImpl.java b/libjava/gnu/java/nio/FileLockImpl.java index c61b9caf10b..bba5880e22c 100644 --- a/libjava/gnu/java/nio/FileLockImpl.java +++ b/libjava/gnu/java/nio/FileLockImpl.java @@ -38,10 +38,10 @@ exception statement from your version. */ package gnu.java.nio; +import gnu.java.nio.channels.FileChannelImpl; + import java.io.IOException; import java.nio.channels.FileLock; -import gnu.classpath.Configuration; -import gnu.java.nio.channels.FileChannelImpl; /** * @author Michael Koch diff --git a/libjava/gnu/java/nio/SocketChannelImpl.java b/libjava/gnu/java/nio/SocketChannelImpl.java index d4dd6e05653..c67b7cb7bb7 100644 --- a/libjava/gnu/java/nio/SocketChannelImpl.java +++ b/libjava/gnu/java/nio/SocketChannelImpl.java @@ -38,12 +38,12 @@ exception statement from your version. */ package gnu.java.nio; -import java.io.InputStream; +import gnu.java.net.PlainSocketImpl; + import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; -import java.net.InetAddress; import java.net.InetSocketAddress; -import gnu.java.net.PlainSocketImpl; import java.net.Socket; import java.net.SocketAddress; import java.net.SocketTimeoutException; @@ -53,13 +53,12 @@ import java.nio.channels.ClosedChannelException; import java.nio.channels.ConnectionPendingException; import java.nio.channels.NoConnectionPendingException; import java.nio.channels.NotYetConnectedException; +import java.nio.channels.SelectionKey; +import java.nio.channels.Selector; +import java.nio.channels.SocketChannel; import java.nio.channels.UnresolvedAddressException; import java.nio.channels.UnsupportedAddressTypeException; -import java.nio.channels.SocketChannel; -import java.nio.channels.Selector; -import java.nio.channels.SelectionKey; import java.nio.channels.spi.SelectorProvider; -import gnu.classpath.Configuration; public final class SocketChannelImpl extends SocketChannel { diff --git a/libjava/gnu/java/nio/charset/UTF_16Decoder.java b/libjava/gnu/java/nio/charset/UTF_16Decoder.java index c8e474d5741..6ff9c2893da 100644 --- a/libjava/gnu/java/nio/charset/UTF_16Decoder.java +++ b/libjava/gnu/java/nio/charset/UTF_16Decoder.java @@ -144,24 +144,6 @@ final class UTF_16Decoder extends CharsetDecoder } } - /** - * Writes c to out in the byte order - * specified by byteOrder. - **/ - private void put (ByteBuffer out, char c) - { - if (byteOrder == BIG_ENDIAN) - { - out.put ((byte) (c >> 8)); - out.put ((byte) (c & 0xFF)); - } - else - { - out.put ((byte) (c & 0xFF)); - out.put ((byte) (c >> 8)); - } - } - protected void implReset () { byteOrder = originalByteOrder; diff --git a/libjava/gnu/java/security/der/DERWriter.java b/libjava/gnu/java/security/der/DERWriter.java index ec3e3df339d..4e679ec802c 100644 --- a/libjava/gnu/java/security/der/DERWriter.java +++ b/libjava/gnu/java/security/der/DERWriter.java @@ -38,28 +38,23 @@ exception statement from your version. */ package gnu.java.security.der; +import gnu.java.security.OID; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; - import java.math.BigInteger; - import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; - import java.text.SimpleDateFormat; - -import java.util.BitSet; import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.TimeZone; -import gnu.java.security.OID; - /** * Methods that allow various Java types to be written as a DER * (Distinguished Encoding Rules) stream to the specified output stream. diff --git a/libjava/gnu/java/security/provider/DSAKeyPairGenerator.java b/libjava/gnu/java/security/provider/DSAKeyPairGenerator.java index 72f7b0eeddb..d4dff167164 100644 --- a/libjava/gnu/java/security/provider/DSAKeyPairGenerator.java +++ b/libjava/gnu/java/security/provider/DSAKeyPairGenerator.java @@ -39,20 +39,18 @@ exception statement from your version. */ package gnu.java.security.provider; import java.math.BigInteger; -import java.security.AlgorithmParameters; import java.security.AlgorithmParameterGenerator; -import java.security.KeyPairGeneratorSpi; +import java.security.AlgorithmParameters; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidParameterException; import java.security.KeyPair; +import java.security.KeyPairGeneratorSpi; import java.security.SecureRandom; -import java.security.InvalidParameterException; -import java.security.InvalidAlgorithmParameterException; import java.security.interfaces.DSAParams; import java.security.spec.AlgorithmParameterSpec; import java.security.spec.DSAParameterSpec; import java.util.Random; -import gnu.java.security.util.Prime; - public class DSAKeyPairGenerator extends KeyPairGeneratorSpi implements java.security.interfaces.DSAKeyPairGenerator { diff --git a/libjava/gnu/java/text/CharacterBreakIterator.java b/libjava/gnu/java/text/CharacterBreakIterator.java index 2febace8301..4db41f5d7d4 100644 --- a/libjava/gnu/java/text/CharacterBreakIterator.java +++ b/libjava/gnu/java/text/CharacterBreakIterator.java @@ -38,7 +38,6 @@ exception statement from your version. */ package gnu.java.text; -import java.text.BreakIterator; import java.text.CharacterIterator; /** diff --git a/libjava/gnu/java/text/LineBreakIterator.java b/libjava/gnu/java/text/LineBreakIterator.java index 59c45d7bdca..e1cb49c7d56 100644 --- a/libjava/gnu/java/text/LineBreakIterator.java +++ b/libjava/gnu/java/text/LineBreakIterator.java @@ -38,7 +38,6 @@ exception statement from your version. */ package gnu.java.text; -import java.text.BreakIterator; import java.text.CharacterIterator; /** diff --git a/libjava/gnu/java/text/SentenceBreakIterator.java b/libjava/gnu/java/text/SentenceBreakIterator.java index 62b99f0fbf8..405bbc5408d 100644 --- a/libjava/gnu/java/text/SentenceBreakIterator.java +++ b/libjava/gnu/java/text/SentenceBreakIterator.java @@ -38,7 +38,6 @@ exception statement from your version. */ package gnu.java.text; -import java.text.BreakIterator; import java.text.CharacterIterator; /** diff --git a/libjava/gnu/java/text/WordBreakIterator.java b/libjava/gnu/java/text/WordBreakIterator.java index 3b6aae8c854..39dbefe6e50 100644 --- a/libjava/gnu/java/text/WordBreakIterator.java +++ b/libjava/gnu/java/text/WordBreakIterator.java @@ -38,7 +38,6 @@ exception statement from your version. */ package gnu.java.text; -import java.text.BreakIterator; import java.text.CharacterIterator; /** diff --git a/libjava/gnu/java/util/DoubleEnumeration.java b/libjava/gnu/java/util/DoubleEnumeration.java index fd033a356f8..21eb605e792 100644 --- a/libjava/gnu/java/util/DoubleEnumeration.java +++ b/libjava/gnu/java/util/DoubleEnumeration.java @@ -37,7 +37,6 @@ exception statement from your version. */ package gnu.java.util; -import java.io.*; import java.util.Enumeration; import java.util.NoSuchElementException; diff --git a/libjava/gnu/java/util/prefs/NodeReader.java b/libjava/gnu/java/util/prefs/NodeReader.java index 6c9fdc9ec06..e343b6b2b5c 100644 --- a/libjava/gnu/java/util/prefs/NodeReader.java +++ b/libjava/gnu/java/util/prefs/NodeReader.java @@ -38,13 +38,13 @@ exception statement from your version. */ package gnu.java.util.prefs; import java.io.BufferedReader; +import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.IOException; import java.io.Reader; - -import java.util.prefs.*; +import java.util.prefs.InvalidPreferencesFormatException; +import java.util.prefs.Preferences; +import java.util.prefs.PreferencesFactory; /** * Reads and imports preferences nodes from files. diff --git a/libjava/java/awt/TextComponent.java b/libjava/java/awt/TextComponent.java index f0c5d6f54b2..2b7317d8519 100644 --- a/libjava/java/awt/TextComponent.java +++ b/libjava/java/awt/TextComponent.java @@ -41,7 +41,6 @@ package java.awt; import java.awt.event.TextEvent; import java.awt.event.TextListener; import java.awt.peer.TextComponentPeer; -import java.awt.peer.ComponentPeer; import java.io.Serializable; import java.util.EventListener; diff --git a/libjava/java/io/FilePermission.java b/libjava/java/io/FilePermission.java index a26f8c70f87..c34a2ecf9b2 100644 --- a/libjava/java/io/FilePermission.java +++ b/libjava/java/io/FilePermission.java @@ -229,7 +229,6 @@ public final class FilePermission extends Permission implements Serializable return false; /* Make sure there are no subdirectories specified underneath this one */ - String sub2 = f2.substring(sub1.length()+1); if(f2.substring(sub1.length()+1).indexOf(File.separatorChar) != -1) return false; diff --git a/libjava/java/lang/ClassLoader.java b/libjava/java/lang/ClassLoader.java index 2b30b1b8a8b..60d7a7f9e02 100644 --- a/libjava/java/lang/ClassLoader.java +++ b/libjava/java/lang/ClassLoader.java @@ -38,9 +38,11 @@ exception statement from your version. */ package java.lang; -import java.io.InputStream; +import gnu.java.util.DoubleEnumeration; +import gnu.java.util.EmptyEnumeration; + import java.io.IOException; -import java.lang.reflect.Constructor; +import java.io.InputStream; import java.net.URL; import java.security.CodeSource; import java.security.PermissionCollection; @@ -49,8 +51,6 @@ import java.security.ProtectionDomain; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; -import gnu.java.util.DoubleEnumeration; -import gnu.java.util.EmptyEnumeration; /** * The ClassLoader is a way of customizing the way Java gets its classes diff --git a/libjava/java/lang/Throwable.java b/libjava/java/lang/Throwable.java index b3005afc6ba..1f236b085ed 100644 --- a/libjava/java/lang/Throwable.java +++ b/libjava/java/lang/Throwable.java @@ -37,13 +37,9 @@ exception statement from your version. */ package java.lang; -import java.io.Serializable; -import java.io.PrintWriter; import java.io.PrintStream; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; -import java.io.IOException; -import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.Serializable; /** * Throwable is the superclass of all exceptions that can be raised. diff --git a/libjava/java/math/BigDecimal.java b/libjava/java/math/BigDecimal.java index f9965add4c1..401ebe95d3c 100644 --- a/libjava/java/math/BigDecimal.java +++ b/libjava/java/math/BigDecimal.java @@ -271,7 +271,6 @@ public class BigDecimal extends Number implements Comparable return newScale == 0 ? ZERO : new BigDecimal (ZERO.intVal, newScale); // Ensure that pow gets a non-negative value. - int valScale = val.scale; BigInteger valIntVal = val.intVal; int power = newScale - (scale - val.scale); if (power < 0)