--- old/test/java/nio/channels/Selector/ByteServer.java 2016-01-15 03:29:28.654139407 -0800 +++ new/test/java/nio/channels/Selector/ByteServer.java 2016-01-15 03:29:28.502139401 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -28,6 +28,7 @@ */ import java.net.Socket; +import java.net.SocketException; import java.net.ServerSocket; import java.net.SocketAddress; import java.net.InetSocketAddress; @@ -43,6 +44,10 @@ this.ss = new ServerSocket(0); } + void setTimeout(int timeout) throws SocketException { + ss.setSoTimeout(timeout); + } + SocketAddress address() { return new InetSocketAddress(ss.getInetAddress(), ss.getLocalPort()); }