- try (InputStream in = new URL(xslUrl).openStream()) {
- Source xslSource = new StreamSource(in);
- foTemplates = transformerFactory.newTemplates(xslSource);
- if (foTemplates == null)
- throw new IllegalStateException("Could not instantiate XSL " + xslUrl);
- } catch (TransformerConfigurationException | IOException e) {
- throw new IllegalStateException("Cannot instantiate XSL " + xslUrl, e);
+ final boolean DEV = false;
+ if (DEV) {
+ try (InputStream in = xslUrl.openStream()) {
+ Source xslSource = new StreamSource(in);
+ foTemplates = transformerFactory.newTemplates(xslSource);
+ if (foTemplates == null)
+ throw new IllegalStateException("Could not instantiate XSL " + xslUrl);
+ } catch (TransformerConfigurationException | IOException e) {
+ throw new IllegalStateException("Cannot instantiate XSL " + xslUrl, e);
+ }