Hi,

While playing with the j2se testsuite, I ran across some problems executing the test in $SUBJECT. Most specifically, the test will generate an error when run on jtreg since the class is not declared public.

Additionally: as written, the testcase doesn't really make a whole lot of sense: it tests the same condition twice, despite the fact that it would (at first glance) appear to do two different tests.

I'm attaching a patch to simplify this testcase to do the only logical thing it can do (at least as I could figure it out): test that an unbound, non-blocking DatagramChannel connection will return null when the receive method is called.

Keith
--- openjdk/j2se/test/java/nio/channels/DatagramChannel/NotBound.java.keiths	2007-10-23 14:49:15.000000000 -0700
+++ openjdk/j2se/test/java/nio/channels/DatagramChannel/NotBound.java	2007-10-23 14:49:41.000000000 -0700
@@ -30,13 +30,8 @@ import java.net.*;
 import java.nio.*;
 import java.nio.channels.*;
 
-class NotBound {
+public class NotBound {
     public static void main(String[] args) throws Exception {
-        test1(false);
-        test1(true);
-    }
-   
-    static void test1(boolean blocking) throws Exception {
         ByteBuffer bb = ByteBuffer.allocateDirect(256);
 	DatagramChannel dc1 = DatagramChannel.open();
         dc1.configureBlocking(false);

Reply via email to