--- /home/tromey/gnu/Nightly/classpath/classpath/gnu/java/nio/NIOServerSocket.java 2004-11-25 02:28:50.000000000 -0700 +++ gnu/java/nio/NIOServerSocket.java 2004-11-25 02:16:34.000000000 -0700 @@ -41,13 +41,10 @@ import gnu.java.net.PlainSocketImpl; import java.io.IOException; -import java.lang.reflect.Method; import java.net.ServerSocket; import java.net.Socket; import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; -import java.security.AccessController; -import java.security.PrivilegedExceptionAction; /** * @author Michael Koch (konqueror@gmx.de) @@ -63,30 +60,7 @@ this.channel = channel; } - public PlainSocketImpl getPlainSocketImpl() - { - try - { - final Object t = this; - final Method method = ServerSocket.class.getDeclaredMethod("getImpl", new Class[0]); - method.setAccessible(true); - PrivilegedExceptionAction action = new PrivilegedExceptionAction() - { - public Object run() throws Exception - { - return method.invoke(t, new Object[0]); - } - }; - return (PlainSocketImpl) AccessController.doPrivileged(action); - } - catch (Exception e) - { - // This should never happen. - Error error = new InternalError("unable to invoke method ServerSocket.getImpl()"); - error.initCause(e); - throw error; - } - } + public native PlainSocketImpl getPlainSocketImpl(); public ServerSocketChannel getChannel() {