ApiBuilder host checking might cause trouble on Android
remmerw opened this issue · 3 comments
remmerw commented
The checking if the host is valid does not make sense (at least not for me),
because when it fails, it is just catched
Moreover, this causes lots of touble (esp. when connection is slow, the
command takes ages to complete, besides on Android the creation of an API
has now to be done on a worker thread, because of network access)
ApiBuilder
public T host(String host) {
try {
// Throws exception if invalid
InetAddress.getByName(host); -> I guess this is a mistake ( the exception is just catched)
this.host = host;
} catch (UnknownHostException e) {
e.printStackTrace();
}
return (T) this;
}
kwek20 commented
Hey @remmerw,
Makes sense, i will add one setter without verification, and actually make use of the error ;)