--- a/jdk/src/share/classes/java/net/Socket.java Wed Mar 12 09:32:38 2008 +0800
+++ b/jdk/src/share/classes/java/net/Socket.java Tue Mar 11 23:37:02 2008 -0700
@@ -731,6 +731,7 @@
* then this method will continue to return the connected address
* after the socket is closed.
*
+
* @return a <code>SocketAddress</code> representing the remote endpoint of this
* socket, or <code>null</code> if it is not connected yet.
* @see #getInetAddress()
@@ -847,9 +848,9 @@
final Socket s = this;
InputStream is = null;
try {
- is = (InputStream)
- AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws IOException {
+ is = AccessController.doPrivileged(
+ new PrivilegedExceptionAction<InputStream>() {
+ public InputStream run() throws IOException {
return impl.getInputStream();
}
});
@@ -887,9 +888,9 @@
final Socket s = this;
OutputStream os = null;
try {
- os = (OutputStream)
- AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws IOException {
+ os = AccessController.doPrivileged(
+ new PrivilegedExceptionAction<OutputStream>() {
+ public OutputStream run() throws IOException {
return impl.getOutputStream();
}
});