After this fix for JDK-7133499 the attached test case no longer works on OS X with Java 1.8.0_20-ea-b21. It fails with the following exception:
java.io.IOException: Unknown error: 316
at sun.nio.ch.NativeThread.signal(Native Method)
at sun.nio.ch.DatagramChannelImpl.implCloseSelectableChannel(DatagramChannelImpl.java:1012)
at java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:234)
at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
at UDPListenerTest$ListenerThread.terminate(UDPListenerTest.java:70)
at UDPListenerTest.shutdown(UDPListenerTest.java:30)
at UDPListenerTest.main(UDPListenerTest.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)