applet: check preprocessed url during configuration validation (IDEA-70227)

This commit is contained in:
anna
2011-12-12 12:23:02 +01:00
parent 5afdafd5e3
commit 40d8cda3fe
@@ -257,10 +257,13 @@ public class AppletConfiguration extends ModuleBasedConfiguration<JavaRunConfigu
throw new RuntimeConfigurationWarning(ExecutionBundle.message("html.file.not.specified.error.message"));
}
try {
new URL(HTML_FILE_NAME);
new URL(getHtmlURL().getUrl());
}
catch (CantRunException ex) {
checkUrlIsValid(ex);
}
catch (MalformedURLException ex) {
throw new RuntimeConfigurationWarning("URL " + HTML_FILE_NAME + " is not valid: " + ex.getLocalizedMessage());
checkUrlIsValid(ex);
}
}
else {
@@ -268,6 +271,10 @@ public class AppletConfiguration extends ModuleBasedConfiguration<JavaRunConfigu
}
}
private void checkUrlIsValid(Exception ex) throws RuntimeConfigurationWarning {
throw new RuntimeConfigurationWarning("URL " + HTML_FILE_NAME + " is not valid: " + ex.getLocalizedMessage());
}
public AppletParameter[] getAppletParameters() {
return myAppletParameters;
}