tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: (documentation) Byte array examples in cluster-interceptor.html
Date Fri, 18 Dec 2009 15:01:45 GMT
On 12/17/2009 10:10 PM, Konstantin Kolinko wrote:
> (reviewing http://svn.apache.org/viewvc?view=revision&revision=883165)
>
> In http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-interceptor.html
>   there are several examples of byte array values, such as
> {216,123,12,3}
>    

this is an IP address, fully valid value, so, yes, we must support it.

Take a look at "byte[] Inet4Address.getAddress()" :)

so for parsing IP addresses, we must support 0..255, otherwise we 
support -127..-127


Filip
> My understanding of the helper function that is used to parse those
> values (tribes.util.Arrays.fromString(String)) is that the example is
> wrong:  bytes are -128<  <  127, and any value outside of that range
> will result in a NumberFormatException (thrown from
> java.lang.Byte.parseByte()).
>
>
> Is there a desire to support any values in the range -128...255
> (modify tribes.util.Arrays.fromString(String) to support them)?  Or we
> better just update the documentation and leave it as is?
>
> I tend to updating the documentation.
>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>    


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message