SelectorImpl.java: Reworked import statements.
authorMichael Koch <konqueror@gmx.de>
Sat, 19 Feb 2005 09:10:39 +0000 (09:10 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Sat, 19 Feb 2005 09:10:39 +0000 (09:10 +0000)
2005-02-19  Michael Koch  <konqueror@gmx.de>

* gnu/java/nio/SelectorImpl.java:
Reworked import statements.
(register): Removed unused code.
* java/nio/channels/Channels.java: Reformatted.
* java/nio/charset/Charset.java: Likewise.
* java/rmi/server/RemoteObject.java
(serialVersionUID): Made private.
* java/rmi/server/UID.java
(serialVersionUID): Likewise.

From-SVN: r95273

libjava/ChangeLog
libjava/gnu/java/nio/SelectorImpl.java
libjava/java/nio/channels/Channels.java
libjava/java/nio/charset/Charset.java
libjava/java/rmi/server/RemoteObject.java
libjava/java/rmi/server/UID.java

index 999d8b91f412d866d7d6030f01dca6b6bd097e2c..39de12b2fe51ee343bc9acdf4ab8b09d84a74ec1 100644 (file)
@@ -1,3 +1,15 @@
+2005-02-19  Michael Koch  <konqueror@gmx.de>
+
+       * gnu/java/nio/SelectorImpl.java:
+       Reworked import statements.
+       (register): Removed unused code.
+       * java/nio/channels/Channels.java: Reformatted.
+       * java/nio/charset/Charset.java: Likewise.
+       * java/rmi/server/RemoteObject.java
+       (serialVersionUID): Made private.
+       * java/rmi/server/UID.java
+       (serialVersionUID): Likewise.
+
 2005-02-19  Michael Koch  <konqueror@gmx.de>
 
        * gnu/java/net/protocol/ftp/ActiveModeDTP.java,
index 62d06624616d98970f6318fdeaaffe2796faf226..f64c86d1f54a84b797db2343be8333a9e7aa2859 100644 (file)
@@ -1,5 +1,5 @@
 /* SelectorImpl.java -- 
-   Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -35,6 +35,7 @@ this exception to your version of the library, but you are not
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
 
+
 package gnu.java.nio;
 
 import java.io.IOException;
@@ -49,11 +50,9 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
-import gnu.classpath.Configuration;
 
 public class SelectorImpl extends AbstractSelector
 {
-  
   private Set keys;
   private Set selected;
 
@@ -375,24 +374,13 @@ public class SelectorImpl extends AbstractSelector
     SelectionKeyImpl result;
     
     if (ch instanceof SocketChannelImpl)
-      {
-        SocketChannelImpl sc = (SocketChannelImpl) ch;
-        result = new SocketChannelSelectionKey (ch, this);
-      }
+      result = new SocketChannelSelectionKey (ch, this);
     else if (ch instanceof DatagramChannelImpl)
-      {
-        DatagramChannelImpl dc = (DatagramChannelImpl) ch;
-        result = new DatagramChannelSelectionKey (ch, this);
-      }
+      result = new DatagramChannelSelectionKey (ch, this);
     else if (ch instanceof ServerSocketChannelImpl)
-      {
-        ServerSocketChannelImpl ssc = (ServerSocketChannelImpl) ch;
-        result = new ServerSocketChannelSelectionKey (ch, this);
-      }
+      result = new ServerSocketChannelSelectionKey (ch, this);
     else
-      {
-        throw new InternalError ("No known channel type");
-      }
+      throw new InternalError ("No known channel type");
 
     synchronized (keys)
       {
index 3e5316efbe815a269b0da22b6c33dbd4fcaf33a0..4c86cc9079a2ee8cf856ee7e17b2fae92f4c097a 100644 (file)
@@ -1,5 +1,5 @@
 /* Channels.java --
-   Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -35,6 +35,7 @@ this exception to your version of the library, but you are not
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
 
+
 package java.nio.channels;
 
 import gnu.java.nio.ChannelInputStream;
@@ -62,7 +63,10 @@ public final class Channels
   /**
    * This class isn't intended to be instantiated.
    */
-  private Channels() {}
+  private Channels()
+  {
+    // Do nothing here.
+  }
 
   /**
    * Constructs a stream that reads bytes from the given channel.
index 67e4fb146ff412fa03c3ff02e84e5c6c6ae781ee..c7672c1c3df74ab7d0e9d3d9dec1e2476fe56524 100644 (file)
@@ -147,19 +147,19 @@ public abstract class Charset implements Comparable
    * Retrieves a charset for the given charset name.
    *
    * @return A charset object for the charset with the specified name, or
-   *   <code>null</code> if no such charset exists.
+   * <code>null</code> if no such charset exists.
    *
    * @throws IllegalCharsetNameException  if the name is illegal
    */
-  private static Charset charsetForName (String charsetName)
+  private static Charset charsetForName(String charsetName)
   {
     checkName (charsetName);
     return provider ().charsetForName (charsetName);
   }
 
-  public static SortedMap availableCharsets ()
+  public static SortedMap availableCharsets()
   {
-    TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER);
+    TreeMap charsets = new TreeMap(String.CASE_INSENSITIVE_ORDER);
 
     for (Iterator i = provider ().charsets (); i.hasNext (); )
       {
@@ -167,15 +167,15 @@ public abstract class Charset implements Comparable
         charsets.put (cs.name (), cs);
       }
 
-    return Collections.unmodifiableSortedMap (charsets);
+    return Collections.unmodifiableSortedMap(charsets);
   }
 
   // XXX: we need to support multiple providers, reading them from
   // java.nio.charset.spi.CharsetProvider in the resource directory
   // META-INF/services
-  private static CharsetProvider provider ()
+  private static CharsetProvider provider()
   {
-    return Provider.provider ();
+    return Provider.provider();
   }
 
   public final String name ()
index 374fee85797304ffd234e902b3b4385c775c5e61..6dca07f8e1a348c54ae68250409c6a82286d53d5 100644 (file)
@@ -50,7 +50,7 @@ import java.util.WeakHashMap;
 public abstract class RemoteObject
        implements Remote, Serializable {
 
-public static final long serialVersionUID = -3215090123894869218l;
+private static final long serialVersionUID = -3215090123894869218l;
 
 protected transient RemoteRef ref;
 
index c6fd30e463a3574f8678af389d64e55832a3c83f..d472e69c9952656944466db4832fc81905ad3163 100644 (file)
@@ -45,7 +45,7 @@ import java.io.Serializable;
 
 public final class UID implements Serializable
 {
-public static final long serialVersionUID = 1086053664494604050L;
+private static final long serialVersionUID = 1086053664494604050L;
 
 private static final Object lock = UID.class;
 private static long baseTime = System.currentTimeMillis();