Minor com.sun.jndi.dns cleanup

Alan Bateman Alan.Bateman at oracle.com
Mon Feb 17 21:17:47 UTC 2014

On 17/02/2014 20:01, Florian Weimer wrote:
> In the DnsName case, the same exception is used for parsing 
> user-supplied strings and data from the wire, and strictly speaking, 
> InvalidNameException should be used only in the former case.
Yes, I think the exceptions in DnsName should be re-examined too 
(doesn't have to be this patch of course). For RecordRecord then it 
would be good to see if there is a better NamingException, the closest 
seems to be CommunicationException with an appropriate cause but maybe 
there are more suitable choices.

> If we are picky about exceptions, we should also wrap those 
> ArrayIndexOutOfBoundsExceptions.
That one is really odd and would be good to re-examine sometime (doesn't 
have to be this patch of course).

>> For the test then we need to add a @bug line with a bug for this (I'll
>> create a bug).  A the test is a negative test then maybe ParsingErrors
>> might be be a better name.
> It contains positive tests as well, to rule out that the change hasn't 
> complete broken things.  Should I split this test into two different 
> files?
It's okay as is (I initially thought it was mostly negative tests but 
this isn't so).


More information about the core-libs-dev mailing list