This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: gnu.java.nio


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited the attached patch which does some fixes to gnu.java.nio.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/zLlNWSOgCCdjSDsRAiaOAKCW5LfmThiGHwLn4wkuwn0ZjFNglgCdGr/D
0DrIVEfwfDz8QoMfBS42vwM=
=VDYd
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2400
diff -u -b -B -r1.2400 ChangeLog
--- ChangeLog	2 Dec 2003 14:36:21 -0000	1.2400
+++ ChangeLog	2 Dec 2003 15:03:04 -0000
@@ -1,5 +1,20 @@
 2003-12-02  Michael Koch  <konqueror@gmx.de>
 
+	* gnu/java/nio/DatagramChannelImpl.java
+	(blocking): Initialize with true by default.
+	* gnu/java/nio/ServerSocketChannelImpl.java
+	(serverSocket): Made private.
+	(blocking): Likewise.
+	(connected): Likewise.
+	* gnu/java/nio/SocketChannelImpl.java
+	(connectionPending): Made private.
+	* gnu/java/nio/FileLockImpl.java
+	(static): Load native library (needed for classpath).
+	* gnu/java/nio/SelectorImpl.java
+	(static): Load native library (needed for classpath).
+
+2003-12-02  Michael Koch  <konqueror@gmx.de>
+
 	* gnu/java/net/protocol/file/Connection.java
 	(getLastModified): Implement for file connections.
 	(getContentLength): Likewise.
Index: gnu/java/nio/DatagramChannelImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/DatagramChannelImpl.java,v
retrieving revision 1.6
diff -u -b -B -r1.6 DatagramChannelImpl.java
--- gnu/java/nio/DatagramChannelImpl.java	22 Nov 2003 15:13:01 -0000	1.6
+++ gnu/java/nio/DatagramChannelImpl.java	2 Dec 2003 15:03:04 -0000
@@ -56,7 +56,7 @@
 public final class DatagramChannelImpl extends DatagramChannel
 {
   private NIODatagramSocket socket;
-  private boolean blocking = false;
+  private boolean blocking = true;
   
   protected DatagramChannelImpl (SelectorProvider provider)
     throws IOException
Index: gnu/java/nio/SelectorImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/SelectorImpl.java,v
retrieving revision 1.10
diff -u -b -B -r1.10 SelectorImpl.java
--- gnu/java/nio/SelectorImpl.java	9 Oct 2003 18:01:08 -0000	1.10
+++ gnu/java/nio/SelectorImpl.java	2 Dec 2003 15:03:04 -0000
@@ -49,9 +49,19 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
+import gnu.classpath.Configuration;
 
 public class SelectorImpl extends AbstractSelector
 {
+  static
+  {
+    // load the shared library needed for native methods.
+    if (Configuration.INIT_LOAD_LIBRARY)
+      {
+        System.loadLibrary ("javanio");
+      }
+  }
+  
   private Set keys;
   private Set selected;
 
Index: gnu/java/nio/ServerSocketChannelImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/ServerSocketChannelImpl.java,v
retrieving revision 1.9
diff -u -b -B -r1.9 ServerSocketChannelImpl.java
--- gnu/java/nio/ServerSocketChannelImpl.java	11 Oct 2003 18:01:35 -0000	1.9
+++ gnu/java/nio/ServerSocketChannelImpl.java	2 Dec 2003 15:03:04 -0000
@@ -54,9 +54,9 @@
 
 public final class ServerSocketChannelImpl extends ServerSocketChannel
 {
-  NIOServerSocket serverSocket;
-  boolean blocking = true;
-  boolean connected = false;
+  private NIOServerSocket serverSocket;
+  private boolean blocking = true;
+  private boolean connected;
 
   protected ServerSocketChannelImpl (SelectorProvider provider)
     throws IOException
Index: gnu/java/nio/SocketChannelImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/SocketChannelImpl.java,v
retrieving revision 1.12
diff -u -b -B -r1.12 SocketChannelImpl.java
--- gnu/java/nio/SocketChannelImpl.java	22 Nov 2003 15:13:01 -0000	1.12
+++ gnu/java/nio/SocketChannelImpl.java	2 Dec 2003 15:03:04 -0000
@@ -66,7 +66,7 @@
   private PlainSocketImpl impl;
   private NIOSocket socket;
   private boolean blocking = true;
-  private boolean connectionPending = false;
+  private boolean connectionPending;
 
   SocketChannelImpl (SelectorProvider provider)
     throws IOException
Index: gnu/java/nio/FileLockImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/FileLockImpl.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 FileLockImpl.java
--- gnu/java/nio/FileLockImpl.java	19 May 2003 06:59:23 -0000	1.4
+++ gnu/java/nio/FileLockImpl.java	2 Dec 2003 15:03:04 -0000
@@ -42,6 +42,7 @@
 import java.io.IOException;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
+import gnu.classpath.Configuration;
 
 /**
  * @author Michael Koch
@@ -49,6 +50,15 @@
  */
 public class FileLockImpl extends FileLock
 {
+  static
+  {
+    // load the shared library needed for native methods.
+    if (Configuration.INIT_LOAD_LIBRARY)
+      {
+        System.loadLibrary ("javanio");
+      }
+  }
+  
   private FileDescriptor fd;
   private boolean released;
   

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]