mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
applet: check preprocessed url during configuration validation (IDEA-70227)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user