--- a/jdk/src/share/classes/sun/security/krb5/internal/NetClient.java Wed Apr 13 16:12:49 2011 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/internal/NetClient.java Thu Apr 14 12:40:30 2011 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -59,7 +59,8 @@
TCPClient(String hostname, int port, int timeout)
throws IOException {
- tcpSocket = new Socket(hostname, port);
+ tcpSocket = new Socket();
+ tcpSocket.connect(new InetSocketAddress(hostname, port), timeout);
out = new BufferedOutputStream(tcpSocket.getOutputStream());
in = new BufferedInputStream(tcpSocket.getInputStream());
tcpSocket.setSoTimeout(timeout);