Minor com.sun.jndi.dns cleanup
Alan.Bateman at oracle.com
Wed Feb 19 17:43:46 UTC 2014
On 19/02/2014 12:56, Florian Weimer wrote:
> It's encoded as a bit field, like this:
> 0000 0000 end of name
> 00xx xxxx regular label of length xxxxxx
> 11yy yyyy upper 6 bits of a compression reference
> (followed by another byte containing the lower 8 bits)
> 01zz zzzz used to be invalid, then extended type, then invalid again
> 10zz zzzz invalid
> I could rename the variable to typeAndLength.
Right, just too easy to mis-read compared to the original code. Using
typeAndLen would be okay, so would "int len = type" and using len when
constructing the String. Anything to make it easier for future maintainers.
> It is thrown by DNSName#add(int, String).
Okay, I guess that is okay (I was mostly just wondering whether
DnsName.add is throwing the most appropriate exception).
So I think we are almost done and this and I can push it for you.
More information about the core-libs-dev