vgritsenko 2003/09/18 07:43:48
Modified: src/java/org/apache/cocoon/generation FileGenerator.java Log: Style changes (braces, indent), log message changed Revision Changes Path 1.5 +20 -15 cocoon-2.1/src/java/org/apache/cocoon/generation/FileGenerator.java Index: FileGenerator.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/generation/FileGenerator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FileGenerator.java 3 Sep 2003 15:00:56 -0000 1.4 +++ FileGenerator.java 18 Sep 2003 14:43:48 -0000 1.5 @@ -85,8 +85,8 @@ * All instance variables are set to <code>null</code>. */ public void recycle() { - if ( null != this.inputSource ) { - super.resolver.release( this.inputSource ); + if (null != this.inputSource) { + super.resolver.release(this.inputSource); this.inputSource = null; } super.recycle(); @@ -98,9 +98,10 @@ */ public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException { + super.setup(resolver, objectModel, src, par); try { - this.inputSource = resolver.resolveURI(src); + this.inputSource = super.resolver.resolveURI(src); } catch (SourceException se) { throw SourceUtil.handle("Error during resolving of '" + src + "'.", se); } @@ -130,25 +131,29 @@ * Generate XML data. */ public void generate() - throws IOException, SAXException, ProcessingException { + throws IOException, SAXException, ProcessingException { + try { - if (this.getLogger().isDebugEnabled()) { - this.getLogger().debug("processing file " + super.source); - this.getLogger().debug("file resolved to " + this.inputSource.getURI()); + if (getLogger().isDebugEnabled()) { + getLogger().debug("Source " + super.source + + " resolved to " + this.inputSource.getURI()); } - SourceUtil.parse( this.manager, this.inputSource, super.xmlConsumer); + SourceUtil.parse(this.manager, this.inputSource, super.xmlConsumer); } catch (SAXException e) { final Exception cause = e.getException(); - if( cause != null ) { - if ( cause instanceof ProcessingException ) + if (cause != null) { + if (cause instanceof ProcessingException) { throw (ProcessingException)cause; - if ( cause instanceof IOException ) + } + if (cause instanceof IOException) { throw (IOException)cause; - if ( cause instanceof SAXException ) + } + if (cause instanceof SAXException) { throw (SAXException)cause; - throw new ProcessingException("Could not read resource " - + this.inputSource.getURI(), cause); + } + throw new ProcessingException("Could not read resource " + + this.inputSource.getURI(), cause); } throw e; }