jdk/src/share/classes/java/net/Socket.java
changeset 51 6fe31bc95bbc
parent 2 90ce3da70b43
child 94 842a7d676774
--- a/jdk/src/share/classes/java/net/Socket.java	Mon Mar 10 14:32:51 2008 -0700
+++ b/jdk/src/share/classes/java/net/Socket.java	Mon Mar 10 15:07:09 2008 -0700
@@ -847,9 +847,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 +887,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();
                     }
                 });