Closed sophokles73 closed 6 months ago
@sophokles73 there are a lot of formatting changes in ShortUriSerializersTest.java, did you run it through some form of coding linter?
Not deliberately. This is just the standard formatting applied by vscode using the standard Java support. Do you have any code formatting rules that should to be followed?
The ShortUriSerializer uses InetAddress.toString() to produce the textual representation of the IP address contained in a UAuthority. In doing so, it assumes that the IP address' hostname is empty and thus toString() yields something like /192.168.1.10, i.e. starts with a slash.
While this assumption is correct for the IP addresses used in UAuthority (which contain no hostname) in this case, the usage of the toString() method has been replaced with getHostAddress() which yields only the textual representation of the IP address' bytes and therefore seems better suited for the purpose of serializing the address to short format.
Fixes #103