}
if (functionsFile == null) {
throw new IOException("No JSON whitelist for CSS Functions");
}
FilePosition sps = FilePosition.startOfFile(new InputSource(
symbolsAndPropertiesFile.getAbsoluteFile().toURI()));
FilePosition fns = FilePosition.startOfFile(new InputSource(
functionsFile.getAbsoluteFile().toURI()));
MessageContext mc = new MessageContext();
mc.addInputSource(sps.source());
mc.addInputSource(fns.source());
MessageQueue mq = new EchoingMessageQueue(
new PrintWriter(new OutputStreamWriter(System.err), true), mc, false);
Set<File> inputsAndDeps = Sets.newHashSet();
for (File f : inputs) { inputsAndDeps.add(f.getAbsoluteFile()); }
for (File f : deps) { inputsAndDeps.add(f.getAbsoluteFile()); }
ImportResolver resolver = new AllowedFileResolver(inputsAndDeps);
CssSchema schema;
try {
schema = new CssSchema(
ConfigUtil.loadWhiteListFromJson(
sps.source().getUri(), resolver, mq),
ConfigUtil.loadWhiteListFromJson(
fns.source().getUri(), resolver, mq));
} catch (ParseException ex) {
ex.toMessageQueue(mq);
throw (IOException) new IOException("Failed to parse schema")
.initCause(ex);
}