INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. @param href the href @param page the HtmlPage @return the calculated target url. @throws MalformedURLException if an IO error occurs
(final String href, final HtmlPage page)
| 216 | * @throws MalformedURLException if an IO error occurs |
| 217 | */ |
| 218 | public static URL getTargetUrl(final String href, final HtmlPage page) throws MalformedURLException { |
| 219 | URL url = page.getFullyQualifiedUrl(href); |
| 220 | // fix for empty url |
| 221 | if (StringUtils.isEmptyOrNull(href)) { |
| 222 | url = UrlUtils.getUrlWithNewRef(url, null); |
| 223 | } |
| 224 | return url; |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * {@inheritDoc} |
no test coverage detected