summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2007-04-17 07:58:32 +0000
committerMark Wielaard <mark@klomp.org>2007-04-17 07:58:32 +0000
commitb9b6aa1a1fb780f3b419425ecc528486b8a69f78 (patch)
tree669d6ebcd0c741e254cebafd51b0fc99cca7b076
parent0433cea9460f03737dc0883835e00717947f09d8 (diff)
downloadclasspath-b9b6aa1a1fb780f3b419425ecc528486b8a69f78.tar.gz
2007-04-17 Tom Tromey <tromey@redhat.com>
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236614 * gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java (createSocket): Change order of delegation.
-rw-r--r--ChangeLog6
-rw-r--r--gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java20
2 files changed, 15 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 512916273..790d31327 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-04-17 Tom Tromey <tromey@redhat.com>
+
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236614
+ * gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java
+ (createSocket): Change order of delegation.
+
2007-04-17 Casey Marshall <csm@gnu.org>
PR classpath/31302:
diff --git a/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java b/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java
index 6c804f9c6..6a3d7352e 100644
--- a/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java
+++ b/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java
@@ -1,5 +1,5 @@
/* SSLSocketFactoryImpl.java --
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@@ -93,10 +93,7 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory
@Override public SSLSocketImpl createSocket(String host, int port)
throws IOException, UnknownHostException
{
- SSLSocketImpl socket = new SSLSocketImpl(contextImpl, host, port);
- InetSocketAddress endpoint = new InetSocketAddress(host, port);
- socket.connect(endpoint);
- return socket;
+ return createSocket(host, port, null, 0);
}
/* (non-Javadoc)
@@ -106,8 +103,10 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory
InetAddress localHost, int localPort)
throws IOException, UnknownHostException
{
- SSLSocketImpl socket = createSocket(host, port);
+ SSLSocketImpl socket = new SSLSocketImpl(contextImpl, host, port);
+ InetSocketAddress endpoint = new InetSocketAddress(host, port);
socket.bind(new InetSocketAddress(localHost, localPort));
+ socket.connect(endpoint);
return socket;
}
@@ -117,10 +116,7 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory
@Override public SSLSocketImpl createSocket(InetAddress host, int port)
throws IOException
{
- SSLSocketImpl socket = new SSLSocketImpl(contextImpl,
- host.getCanonicalHostName(), port);
- socket.connect(new InetSocketAddress(host, port));
- return socket;
+ return createSocket(host, port, null, 0);
}
/* (non-Javadoc)
@@ -130,8 +126,10 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory
InetAddress localHost, int localPort)
throws IOException
{
- SSLSocketImpl socket = createSocket(host, port);
+ SSLSocketImpl socket = new SSLSocketImpl(contextImpl,
+ host.getCanonicalHostName(), port);
socket.bind(new InetSocketAddress(localHost, localPort));
+ socket.connect(new InetSocketAddress(host, port));
return socket;
}
}