I am new to the FOP code so please bear with me... but have a quick question about the revolve method in FOURIResolver. It appears to catch all exceptions, log errors, silently return null and doesn't seem to ever throw a TransformerException.

    public Source resolve(String href, String base)
        throws javax.xml.transform.TransformerException {

        .....

        try {
            URLConnection connection = absoluteURL.openConnection();
            connection.setAllowUserInteraction(false);
            connection.setDoInput(true);
            updateURLConnection(connection, href);
            connection.connect();
            return new StreamSource(connection.getInputStream(), effURL);
        } catch (FileNotFoundException fnfe) {
//Note: This is on "debug" level since the caller is supposed to handle this
            log.debug("File not found: " + effURL);
        } catch (java.io.IOException ioe) {
log.error("Error with opening URL '" + href + "': " + ioe.getMessage(), ioe);
        }
        return null;
    }

Is this desired behaviour (especially if this method is being invoked indirectly as part of a TestCase)?

Cheers,

Adrian.

Reply via email to