harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r405465 - in /incubator/harmony/enhanced/classlib/trunk/modules/nio/src: main/java/java/nio/channels/spi/ main/java/org/apache/harmony/nio/internal/ test/java/org/apache/harmony/tests/java/nio/channels/
Date Tue, 09 May 2006 16:54:31 GMT
Author: tellison
Date: Tue May  9 09:54:29 2006
New Revision: 405465

URL: http://svn.apache.org/viewcvs?rev=405465&view=rev
Log:
Generics uplift for NIO internals
Tidy up compiler warnings on NIO tests

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/LockManager.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SocketChannelTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java?rev=405465&r1=405464&r2=405465&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java
Tue May  9 09:54:29 2006
@@ -36,7 +36,7 @@
 public abstract class AbstractInterruptibleChannel implements Channel,
 		InterruptibleChannel {
 
-	private static List blockingThreads = new LinkedList();
+	private static List<Thread> blockingThreads = new LinkedList();
 
 	private volatile boolean closed = false;
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java?rev=405465&r1=405464&r2=405465&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java
Tue May  9 09:54:29 2006
@@ -41,7 +41,7 @@
     /*
      * The collection of key.
      */
-    private List keyList = new ArrayList();
+    private List<SelectionKey> keyList = new ArrayList<SelectionKey>();
 
     private final Object blockingLock = new Object();
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java?rev=405465&r1=405464&r2=405465&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
Tue May  9 09:54:29 2006
@@ -52,8 +52,6 @@
 
     private static SelectorProvider provider = null;
 
-    private static Channel inheritedChannel = null;
-
     /**
      * Constructor for this class.
      * 
@@ -107,9 +105,9 @@
         Enumeration enumeration = null;
         SelectorProvider tempProvider = null;
 
-        ClassLoader classLoader = (ClassLoader) AccessController
-                .doPrivileged(new PrivilegedAction() {
-                    public Object run() {
+        ClassLoader classLoader = AccessController.doPrivileged(
+                new PrivilegedAction<ClassLoader>() {
+                    public ClassLoader run() {
                         return ClassLoader.getSystemClassLoader();
                     }
                 });
@@ -158,18 +156,18 @@
      * load by system property.
      */
     static SelectorProvider loadProviderByProperty() {
-        return (SelectorProvider) AccessController
-                .doPrivileged(new PrivilegedAction() {
-                    public Object run() {
+        return AccessController.doPrivileged(
+                new PrivilegedAction<SelectorProvider>() {
+                    public SelectorProvider run() {
                         // FIXME check if use this ClassLoader or system
                         // ClassLoader
                         try {
-                            final String className = System
-                                    .getProperty(PROVIDER_IN_SYSTEM_PROPERTY);
+                            final String className =
+                                System.getProperty(PROVIDER_IN_SYSTEM_PROPERTY);
                             if (null != className) {
-                                return Thread.currentThread()
-                                        .getContextClassLoader().loadClass(
-                                                className);
+                                Class spClass = Thread.currentThread()
+                                        .getContextClassLoader().loadClass(className);
+                                return (SelectorProvider)spClass.newInstance();
                             }
                             return null;
                         } catch (Exception e) {
@@ -177,7 +175,6 @@
                         }
                     }
                 });
-
     }
 
     /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/LockManager.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/LockManager.java?rev=405465&r1=405464&r2=405465&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/LockManager.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/org/apache/harmony/nio/internal/LockManager.java
Tue May  9 09:54:29 2006
@@ -38,7 +38,7 @@
 		}
 	};
 
-	private final SortedSet locks = new TreeSet(lockComparator);
+	private final SortedSet<FileLock> locks = new TreeSet(lockComparator);
 
 	/*
 	 * Default Constructor.

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java?rev=405465&r1=405464&r2=405465&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
Tue May  9 09:54:29 2006
@@ -557,6 +557,8 @@
     public void testConnect_UnsupportedType() throws IOException {
         assertFalse(this.channel1.isConnected());
         class SubSocketAddress extends SocketAddress {
+            private static final long serialVersionUID = 1L;
+
             public SubSocketAddress() {
                 super();
             }
@@ -1572,6 +1574,7 @@
     // -------------------------------------------------------------------
 
     private class mockAddress extends SocketAddress {
+        private static final long serialVersionUID = 1L;
     }
 
     public void testSend_MockSocketAddress() throws Exception {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SocketChannelTest.java?rev=405465&r1=405464&r2=405465&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
Tue May  9 09:54:29 2006
@@ -1220,6 +1220,8 @@
 
     public void testCFII_UnsupportedType() throws Exception {
         class SubSocketAddress extends SocketAddress {
+            private static final long serialVersionUID = 1L;
+
             //empty
             public SubSocketAddress() {
                 super();



Mime
View raw message