boolean (final Project project, ProgressIndicator indicator, final String resourceUrl, FetchResult result) { if (myForceResultIsValid) { return true; } if (!ApplicationManager.getApplication().isUnitTestMode() && result.contentType != null && result.contentType.contains(HTML_MIME) && new String(result.bytes, StandardCharsets.UTF_8).contains("<html")) { ApplicationManager.getApplication().invokeLater(() -> Messages.showMessageDialog(project, XmlBundle.message( "xml.intention.fetch.error.invalid.url.no.xml.file.at.location", resourceUrl), XmlBundle.message( "xml.intention.fetch.error.invalid.url.title"), Messages.getErrorIcon()), indicator.getModalityState()); return false; } return true; }