PATCH: java.nio.channels.DatagramChannel/NotBound.java test patch

Alan Bateman Alan.Bateman at Sun.COM
Wed Oct 24 20:57:22 UTC 2007


Keith Seitz wrote:
> 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
Thanks Keith. As it happens, I also ran into this one a few days ago. 
The test is >5 years old and only recently started failing for me when I 
picked up the most recent jtreg. Anyway, making the class public, as you 
suggest, fixes the problem so that the test runs. The original intent 
seems to have been to test both the blocking and non-blocking cases and 
there was probably a typo in the original test that went unnoticed. I'll 
get the fix for the test in once the transition to Mercurial is done and 
we start integrating fixes again.  Test aside, we also need to clarify 
the specification for the receive method to state the required behavior 
when invoked on a channel that is unbound. I'll create a bug to track that.

-Alan.



More information about the core-libs-dev mailing list