MyFetchResult (@NotNull String url) { if (url.startsWith("mailto")) { return MyFetchResult.OK; } try { HttpRequests.request(url).connectTimeout(3000).readTimeout(3000).tryConnect(); } catch (UnknownHostException e) { LOG.info(e); return MyFetchResult.UNKNOWN_HOST; } catch (HttpRequests.HttpStatusException e) { LOG.info(e); return MyFetchResult.NONEXISTENCE; } catch (IOException e) { LOG.info(e); } catch (IllegalArgumentException e) { LOG.debug(e); } return MyFetchResult.OK; }