Collection failedKeys = new ArrayList();
failedKeys.add(SCRIPT_SOURCE_URL_ENCODING_PREF_KEY);
throw new ValidatorException("Unsupported encoding: " + this.scriptSourceUriEncoding, failedKeys);
}
this.groovyCodeSource = new GroovyCodeSource(new File(decodedScriptSourceUri.substring(5)));
}
else if (this.scriptSourceUri.startsWith("classpath:"))
{
String resourceURL = this.groovyClassLoader.getResource(this.scriptSourceUri.substring(10))
.toString();
if (resourceURL.startsWith("file:"))
{
String decodedScriptSourceUri = resourceURL;
try
{
decodedScriptSourceUri = URLDecoder.decode(resourceURL, this.scriptSourceUriEncoding);
}
catch (UnsupportedEncodingException encodingEx)
{
Collection failedKeys = new ArrayList();
failedKeys.add(SCRIPT_SOURCE_URL_ENCODING_PREF_KEY);
throw new ValidatorException("Unsupported encoding: " + this.scriptSourceUriEncoding, failedKeys);
}
this.groovyCodeSource = new GroovyCodeSource(new File(decodedScriptSourceUri.substring(5)));
}
else
{
Collection failedKeys = new ArrayList();
failedKeys.add(SCRIPT_SOURCE_PREF_KEY);