aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarren Levy <warrenl@cygnus.com>1999-05-12 01:51:23 +0000
committerWarren Levy <warrenl@gcc.gnu.org>1999-05-12 01:51:23 +0000
commit7d9a55eb5b7415e6ccdfa4cfb87c1dfdacff2379 (patch)
tree6d5a8839ae54f3074f11d0fd0aecc7dc1825f003
parent3f281ce6f578e4b40d6e53d65cf9e09ab62cce3d (diff)
downloadgcc-7d9a55eb5b7415e6ccdfa4cfb87c1dfdacff2379.zip
gcc-7d9a55eb5b7415e6ccdfa4cfb87c1dfdacff2379.tar.gz
gcc-7d9a55eb5b7415e6ccdfa4cfb87c1dfdacff2379.tar.bz2
PlainSocketImpl.java: Corrected copyright & header comments.
* java/net/PlainSocketImpl.java: Corrected copyright & header comments. * java/net/SocketImpl.java: Added marker for JDK 1.2 work. * java/net/natPlainSocketImpl.cc (bind): Throw BindException. (connect): Throw ConnectException. From-SVN: r26896
-rw-r--r--libjava/ChangeLog7
-rw-r--r--libjava/java/net/PlainSocketImpl.java15
-rw-r--r--libjava/java/net/SocketImpl.java2
-rw-r--r--libjava/java/net/natPlainSocketImpl.cc6
4 files changed, 26 insertions, 4 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index f07a5c6..279d50f 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,10 @@
+1999-05-12 Warren Levy <warrenl@cygnus.com>
+
+ * java/net/PlainSocketImpl.java: Corrected copyright & header comments.
+ * java/net/SocketImpl.java: Added marker for JDK 1.2 work.
+ * java/net/natPlainSocketImpl.cc (bind): Throw BindException.
+ (connect): Throw ConnectException.
+
1999-05-11 Tom Tromey <tromey@cygnus.com>
* Makefile.in: Rebuilt.
diff --git a/libjava/java/net/PlainSocketImpl.java b/libjava/java/net/PlainSocketImpl.java
index 5bc2cae..19a6439 100644
--- a/libjava/java/net/PlainSocketImpl.java
+++ b/libjava/java/net/PlainSocketImpl.java
@@ -1,6 +1,6 @@
-// natClass.cc - Implementation of java.lang.Class native methods.
+// PlainSocketImpl.java - Implementation of SocketImpl.
-/* Copyright (C) 1998, 1999 Cygnus Solutions
+/* Copyright (C) 1999 Cygnus Solutions
This file is part of libgcj.
@@ -11,6 +11,17 @@ details. */
package java.net;
import java.io.*;
+/**
+ * @author Per Bothner <bothner@cygnus.com>
+ * @date February 22, 1999.
+ */
+
+/**
+ * Written using on-line Java Platform 1.2 API Specification, as well
+ * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
+ * Status: Believed complete and correct.
+ */
+
class PlainSocketImpl extends SocketImpl
{
int fnum = -1;
diff --git a/libjava/java/net/SocketImpl.java b/libjava/java/net/SocketImpl.java
index 5ad3118..c10ffcc 100644
--- a/libjava/java/net/SocketImpl.java
+++ b/libjava/java/net/SocketImpl.java
@@ -20,6 +20,8 @@ import java.io.*;
* Believed complete and correct, except for implementation of toString.
*/
+// JDK1.2: needs to implement SocketOptions.
+// JDK1.2: public abstract class SocketImpl implements SocketOptions
public abstract class SocketImpl
{
protected InetAddress address;
diff --git a/libjava/java/net/natPlainSocketImpl.cc b/libjava/java/net/natPlainSocketImpl.cc
index c2c61fc..5926ab6 100644
--- a/libjava/java/net/natPlainSocketImpl.cc
+++ b/libjava/java/net/natPlainSocketImpl.cc
@@ -18,6 +18,8 @@ details. */
#include <cni.h>
#include <java/io/IOException.h>
#include <java/io/FileDescriptor.h>
+#include <java/net/BindException.h>
+#include <java/net/ConnectException.h>
#include <java/net/PlainSocketImpl.h>
#include <java/net/InetAddress.h>
@@ -84,7 +86,7 @@ java::net::PlainSocketImpl::bind (java::net::InetAddress *host, jint lport)
char msg[100];
char* strerr = strerror (errno);
sprintf (msg, "SocketImpl.bind: %.*s", 80, strerr);
- JvThrow (new java::io::IOException (JvNewStringUTF (msg)));
+ JvThrow (new java::net::BindException (JvNewStringUTF (msg)));
}
void
@@ -123,7 +125,7 @@ java::net::PlainSocketImpl::connect (java::net::InetAddress *host, jint rport)
char msg[100];
char* strerr = strerror (errno);
sprintf (msg, "SocketImpl.connect: %.*s", 80, strerr);
- JvThrow (new java::io::IOException (JvNewStringUTF (msg)));
+ JvThrow (new java::net::ConnectException (JvNewStringUTF (msg)));
}
void