The only hint that it uses long, which in Java is usually in milliseconds, but obviously the block is not documented anywhere.
The method setConnectionTimeoutshould have been named setConnectionTimeoutMillis, and JavaDoc should have mentioned it somewhere. Developers should do this whenever unit is involved .
Maybe Java should have had some kind of typed number, for example Long<MilliSeconds>, and the numbers of the wrong "block" would be rejected by the compiler :)
source
share