Author: vsiveton Date: Mon Aug 24 12:05:48 2009 New Revision: 807169 URL: http://svn.apache.org/viewvc?rev=807169&view=rev Log: DOXIA-364: Guarantee the state of sinks and parsers impl
o impl init() method from r807164 o use final fields Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.java maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.java URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.java?rev=807169&r1=807168&r2=807169&view=diff ============================================================================== --- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.java (original) +++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlContentParser.java Mon Aug 24 12:05:48 2009 @@ -109,4 +109,12 @@ isEmptyElement = false; } + + /** {...@inheritdoc} */ + protected void init() + { + super.init(); + + this.isEmptyElement = false; + } } Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java?rev=807169&r1=807168&r2=807169&view=diff ============================================================================== --- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java (original) +++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java Mon Aug 24 12:05:48 2009 @@ -93,6 +93,10 @@ public void parse( Reader source, Sink sink ) throws ParseException { + this.faqs = null; + this.sourceContent = null; + init(); + try { StringWriter contentWriter = new StringWriter(); @@ -121,8 +125,12 @@ } finally { - logWarnings(); + + this.faqs = null; + this.sourceContent = null; + setSecondParsing( false ); + init(); } } @@ -424,6 +432,19 @@ } } + /** {...@inheritdoc} */ + protected void init() + { + super.init(); + + this.currentFaq = null; + this.currentPart = null; + this.buffer = null; + this.warnMessages = null; + this.macroName = null; + this.macroParameters = null; + } + /** * TODO import from XdocParser, probably need to be generic. *