8175033: (se) Improve internal timing of java/nio/channels/Selector/WakeupAfterClose.java

Add print of expected ClosedSelectorException

Reviewed-by: alanb
This commit is contained in:
Brian Burkhalter 2017-02-16 12:26:23 -08:00
parent a7e8c44cc1
commit a66653d1dc

View File

@ -27,8 +27,9 @@
* @key intermittent
*/
import java.nio.channels.Selector;
import java.io.IOException;
import java.nio.channels.ClosedSelectorException;
import java.nio.channels.Selector;
public class WakeupAfterClose {
@ -41,6 +42,9 @@ public class WakeupAfterClose {
sel.select();
} catch (IOException x) {
x.printStackTrace();
} catch (ClosedSelectorException y) {
System.err.println
("Caught expected ClosedSelectorException");
}
}
};