maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1090706 [2/3] - in /maven/doxia/doxia/trunk: ./ doxia-book/ doxia-book/src/main/java/org/apache/maven/doxia/book/ doxia-book/src/main/java/org/apache/maven/doxia/book/context/ doxia-book/src/main/java/org/apache/maven/doxia/book/services/i...
Date Sat, 09 Apr 2011 23:15:31 GMT
Modified: maven/doxia/doxia/trunk/doxia-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-maven-plugin/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-maven-plugin/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-maven-plugin/pom.xml Sat Apr  9 23:15:28 2011
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.doxia</groupId>
     <artifactId>doxia</artifactId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
@@ -96,7 +96,7 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.doxia</groupId>
       <artifactId>doxia-decoration-model</artifactId>
-      <version>1.1.2</version>
+      <version>1.2-SNAPSHOT</version>
     </dependency>
 
     <dependency>

Modified: maven/doxia/doxia/trunk/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/Book.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/Book.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/Book.java (original)
+++ maven/doxia/doxia/trunk/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/Book.java Sat Apr  9 23:15:28 2011
@@ -34,16 +34,16 @@ public class Book
     private String descriptor;
 
     /** The list of formats to produce. */
-    private List formats;
+    private List<Format> formats;
 
     /** The base directory of source files. */
     private String directory;
 
     /** Files to include. */
-    private List includes;
+    private List<String> includes;
 
     /** Files to exclude. */
-    private List excludes;
+    private List<String> excludes;
 
     /**
      * Returns the path to the book descriptor file.
@@ -60,7 +60,7 @@ public class Book
      *
      * @return the list of formats.
      */
-    public List getFormats()
+    public List<Format> getFormats()
     {
         return formats;
     }
@@ -80,7 +80,7 @@ public class Book
      *
      * @return the list of files to include.
      */
-    public List getIncludes()
+    public List<String> getIncludes()
     {
         return includes;
     }
@@ -90,7 +90,7 @@ public class Book
      *
      * @return the list of files to exclude.
      */
-    public List getExcludes()
+    public List<String> getExcludes()
     {
         return excludes;
     }

Modified: maven/doxia/doxia/trunk/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java (original)
+++ maven/doxia/doxia/trunk/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java Sat Apr  9 23:15:28 2011
@@ -34,7 +34,6 @@ import org.codehaus.plexus.util.StringUt
 
 import java.io.File;
 import java.io.IOException;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 
@@ -80,7 +79,7 @@ public class DoxiaRenderBooksMojo
      * @parameter
      * @required
      */
-    private List books;
+    private List<Book> books;
 
     /**
      * Base directory of the project.
@@ -130,10 +129,8 @@ public class DoxiaRenderBooksMojo
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
-        for ( Iterator it = books.iterator(); it.hasNext(); )
+        for ( Book book : books )
         {
-            Book book = (Book) it.next();
-
             // ----------------------------------------------------------------------
             // Validate
             // ----------------------------------------------------------------------
@@ -162,16 +159,10 @@ public class DoxiaRenderBooksMojo
 
             File descriptor = new File( basedir, book.getDescriptor() );
 
-            String includes = "";
-
+            String includes;
             if ( book.getIncludes() != null )
             {
-                for ( Iterator j = book.getIncludes().iterator(); j.hasNext(); )
-                {
-                    String include = (String) j.next();
-
-                    includes += include + ",";
-                }
+                includes = StringUtils.join( book.getIncludes().iterator(), "," );
             }
             else
             {
@@ -182,12 +173,7 @@ public class DoxiaRenderBooksMojo
 
             if ( book.getExcludes() != null )
             {
-                for ( Iterator j = book.getExcludes().iterator(); j.hasNext(); )
-                {
-                    String exclude = (String) j.next();
-
-                    excludes += exclude + ",";
-                }
+                excludes = StringUtils.join( book.getExcludes().iterator(), "," );
             }
 
             // ----------------------------------------------------------------------
@@ -202,7 +188,7 @@ public class DoxiaRenderBooksMojo
                 getLog().debug( "Excludes: " + excludes );
             }
 
-            List files;
+            List<File> files;
 
             try
             {
@@ -238,20 +224,16 @@ public class DoxiaRenderBooksMojo
             // Render the book in all the formats
             // -----------------------------------------------------------------------
 
-            List localesList = siteTool.getAvailableLocales( locales );
+            List<Locale> localesList = siteTool.getAvailableLocales( locales );
 
             // Default is first in the list
-            Locale defaultLocale = (Locale) localesList.get( 0 );
+            Locale defaultLocale = localesList.get( 0 );
             Locale.setDefault( defaultLocale );
 
-            for ( Iterator iterator = localesList.iterator(); iterator.hasNext(); )
+            for ( Locale locale : localesList )
             {
-                Locale locale = (Locale) iterator.next();
-
-                for ( Iterator j = book.getFormats().iterator(); j.hasNext(); )
+                for ( Format format : book.getFormats() )
                 {
-                    Format format = (Format) j.next();
-
                     File outputDirectory = new File( generatedDocs, format.getId() );
                     File directory = new File( outputDirectory + "/" + locale.toString(), bookModel.getId() );
 
@@ -311,10 +293,8 @@ public class DoxiaRenderBooksMojo
         {
             buffer.append( "Validation errors:" );
 
-            for ( Iterator it = result.getErrors().iterator(); it.hasNext(); )
+            for ( String error : result.getErrors() )
             {
-                String error = (String) it.next();
-
                 buffer.append( LINE_SEPARATOR ).append( " " ).append( error );
             }
         }
@@ -323,10 +303,8 @@ public class DoxiaRenderBooksMojo
         {
             buffer.append( "Validation warnings:" );
 
-            for ( Iterator it = result.getWarnings().iterator(); it.hasNext(); )
+            for ( String error : result.getWarnings() )
             {
-                String error = (String) it.next();
-
                 buffer.append( LINE_SEPARATOR ).append( " " ).append( error );
             }
         }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/pom.xml Sat Apr  9 23:15:28 2011
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>doxia-modules</artifactId>
     <groupId>org.apache.maven.doxia</groupId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java Sat Apr  9 23:15:28 2011
@@ -38,7 +38,6 @@ import java.io.Reader;
 import java.io.StringReader;
 import java.io.StringWriter;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 import java.util.StringTokenizer;
@@ -165,7 +164,7 @@ public class AptParser
 
     /** Map of warn messages with a String as key to describe the error type and a Set as value.
      * Using to reduce warn messages. */
-    protected Map warnMessages;
+    protected Map<String, Set<String>> warnMessages;
 
     private static final int NUMBER_OF_SPACES = 85;
 
@@ -1211,7 +1210,7 @@ public class AptParser
 
             length = line.length();
             indent = 0;
-            lineLoop: for ( i = 0; i < length; ++i )
+            for ( i = 0; i < length; ++i )
             {
                 switch ( line.charAt( i ) )
                 {
@@ -1609,13 +1608,13 @@ public class AptParser
 
         if ( warnMessages == null )
         {
-            warnMessages = new HashMap();
+            warnMessages = new HashMap<String, Set<String>>();
         }
 
-        Set set = (Set) warnMessages.get( key );
+        Set<String> set = warnMessages.get( key );
         if ( set == null )
         {
-            set = new TreeSet();
+            set = new TreeSet<String>();
         }
         set.add( msg );
         warnMessages.put( key, set );
@@ -1628,16 +1627,10 @@ public class AptParser
     {
         if ( getLog().isWarnEnabled() && this.warnMessages != null && !isSecondParsing() )
         {
-            for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); )
+            for ( Map.Entry<String, Set<String>> entry : this.warnMessages.entrySet() )
             {
-                Map.Entry entry = (Map.Entry) it.next();
-
-                Set set = (Set) entry.getValue();
-
-                for ( Iterator it2 = set.iterator(); it2.hasNext(); )
+                for ( String msg : entry.getValue() )
                 {
-                    String msg = (String) it2.next();
-
                     getLog().warn( msg );
                 }
             }
@@ -2892,7 +2885,7 @@ public class AptParser
 
             String macroId = params[0];
 
-            Map parameters = new HashMap();
+            Map<String, Object> parameters = new HashMap<String, Object>();
 
             for ( int i = 1; i < params.length; i++ )
             {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java Sat Apr  9 23:15:28 2011
@@ -100,7 +100,7 @@ public class AptSink
     private String listNestingIndent;
 
     /**  listStyles. */
-    private final Stack listStyles;
+    private final Stack<String> listStyles;
 
     // ----------------------------------------------------------------------
     // Public protected methods
@@ -115,7 +115,7 @@ public class AptSink
     protected AptSink( Writer writer )
     {
         this.writer = new PrintWriter( writer );
-        this.listStyles = new Stack();
+        this.listStyles = new Stack<String>();
 
         init();
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/pom.xml Sat Apr  9 23:15:28 2011
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <artifactId>doxia-modules</artifactId>
     <groupId>org.apache.maven.doxia</groupId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java Sat Apr  9 23:15:28 2011
@@ -21,7 +21,6 @@ package org.apache.maven.doxia.module.co
 
 import java.io.Reader;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.maven.doxia.module.confluence.parser.Block;
@@ -62,18 +61,18 @@ public class ConfluenceParser
         init();
     }
 
-    private List parse( ByLineSource source )
+    private List<Block> parse( ByLineSource source )
         throws ParseException
     {
         init();
 
-        List blocks = new ArrayList();
+        List<Block> blocks = new ArrayList<Block>();
 
         String line;
 
         while ( ( line = source.getNextLine() ) != null )
         {
-            boolean accepted = false;
+            //boolean accepted = false;
 
             for ( int i = 0; i < parsers.length; i++ )
             {
@@ -86,7 +85,7 @@ public class ConfluenceParser
 
                 if ( parser.accept( line, source ) )
                 {
-                    accepted = true;
+                    //accepted = true;
 
                     blocks.add( parser.visit( line, source ) );
 
@@ -113,7 +112,7 @@ public class ConfluenceParser
 
         try
         {
-            List blocks = parse( src );
+            List<Block> blocks = parse( src );
 
             sink.head();
 
@@ -121,10 +120,8 @@ public class ConfluenceParser
 
             sink.body();
 
-            for ( Iterator i = blocks.iterator(); i.hasNext(); )
+            for ( Block block : blocks )
             {
-                Block block = (Block) i.next();
-
                 block.traverse( sink );
             }
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java Sat Apr  9 23:15:28 2011
@@ -56,7 +56,7 @@ public class ConfluenceSink
     private int levelList = 0;
 
     /**  listStyles. */
-    private final Stack listStyles;
+    private final Stack<String> listStyles;
 
     /** An indication on if we're in verbatim box mode. */
     private boolean verbatimBoxedFlag;
@@ -76,7 +76,7 @@ public class ConfluenceSink
     protected ConfluenceSink( Writer writer )
     {
         this.out = new PrintWriter( writer );
-        this.listStyles = new Stack();
+        this.listStyles = new Stack<String>();
 
         init();
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AbstractFatherBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AbstractFatherBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AbstractFatherBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/AbstractFatherBlock.java Sat Apr  9 23:15:28 2011
@@ -19,7 +19,6 @@ package org.apache.maven.doxia.module.co
  * under the License.
  */
 
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.maven.doxia.sink.Sink;
@@ -32,7 +31,7 @@ import org.apache.maven.doxia.sink.Sink;
 public abstract class AbstractFatherBlock
     implements Block
 {
-    private  List blocks;
+    private List<Block> blocks;
 
     /**
      * <p>before.</p>
@@ -53,7 +52,7 @@ public abstract class AbstractFatherBloc
      *
      * @param childBlocks the child blocks.
      */
-    public AbstractFatherBlock(  List childBlocks )
+    public AbstractFatherBlock( List<Block> childBlocks )
     {
         if ( childBlocks == null )
         {
@@ -64,14 +63,12 @@ public abstract class AbstractFatherBloc
     }
 
     /** {@inheritDoc} */
-    public  void traverse(  Sink sink )
+    public void traverse(  Sink sink )
     {
         before( sink );
 
-        for ( Iterator i = blocks.iterator(); i.hasNext(); )
+        for ( Block block : blocks )
         {
-            Block block = (Block) i.next();
-
             block.traverse( sink );
         }
 
@@ -83,7 +80,7 @@ public abstract class AbstractFatherBloc
      *
      * @return a {@link java.util.List} object.
      */
-    public  List getBlocks()
+    public List<Block> getBlocks()
     {
         return blocks;
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BoldBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BoldBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BoldBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/BoldBlock.java Sat Apr  9 23:15:28 2011
@@ -36,7 +36,7 @@ public class BoldBlock
      *
      * @param childBlocks the child blocks.
      */
-    public BoldBlock( List childBlocks )
+    public BoldBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ChildBlocksBuilder.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ChildBlocksBuilder.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ChildBlocksBuilder.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ChildBlocksBuilder.java Sat Apr  9 23:15:28 2011
@@ -41,7 +41,7 @@ public class ChildBlocksBuilder
 
     private boolean insideLink = false;
 
-    private List blocks = new ArrayList();
+    private List<Block> blocks = new ArrayList<Block>();
 
     private StringBuffer text = new StringBuffer();
 
@@ -64,9 +64,9 @@ public class ChildBlocksBuilder
      *
      * @return a list of Blocks that can be used to render it
      */
-    public List getBlocks()
+    public List<Block> getBlocks()
     {
-        List specialBlocks = new ArrayList();
+        List<Block> specialBlocks = new ArrayList<Block>();
 
         for ( int i = 0; i < input.length(); i++ )
         {
@@ -253,9 +253,9 @@ public class ChildBlocksBuilder
         return blocks;
     }
 
-    private List getList( Block block, List currentBlocks )
+    private List<Block> getList( Block block, List<Block> currentBlocks )
     {
-        List list = new ArrayList();
+        List<Block> list = new ArrayList<Block>();
 
         if ( insideBold || insideItalic || insideMonospaced )
         {
@@ -267,16 +267,16 @@ public class ChildBlocksBuilder
         return list;
     }
 
-    private List getChildren( StringBuffer buffer, List currentBlocks )
+    private List<Block> getChildren( StringBuffer buffer, List<Block> currentBlocks )
     {
         String txt = buffer.toString().trim();
 
         if ( currentBlocks.isEmpty() && StringUtils.isEmpty( txt ) )
         {
-            return new ArrayList();
+            return new ArrayList<Block>();
         }
 
-        ArrayList list = new ArrayList();
+        ArrayList<Block> list = new ArrayList<Block>();
 
         if ( !insideBold && !insideItalic && !insideMonospaced )
         {
@@ -298,7 +298,7 @@ public class ChildBlocksBuilder
         return input.length() > i + 1 ? input.charAt( i + 1 ) : '\0';
     }
 
-    private StringBuffer addTextBlockIfNecessary( List blcks, List specialBlocks, StringBuffer txt )
+    private StringBuffer addTextBlockIfNecessary( List<Block> blcks, List<Block> specialBlocks, StringBuffer txt )
     {
         if ( txt.length() == 0 )
         {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/DefinitionListBlock.java Sat Apr  9 23:15:28 2011
@@ -19,7 +19,6 @@ package org.apache.maven.doxia.module.co
  * under the License.
  */
 
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.maven.doxia.sink.Sink;
@@ -33,7 +32,7 @@ class DefinitionListBlock
 {
     private String title;
 
-    private List text;
+    private List<Block> text;
 
     DefinitionListBlock( String title, String text )
     {
@@ -55,9 +54,8 @@ class DefinitionListBlock
 
         sink.definition();
 
-        for ( Iterator iterator = text.iterator(); iterator.hasNext(); )
+        for ( Block block : text )
         {
-            Block block = (Block) iterator.next();
             block.traverse( sink );
         }
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ItalicBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ItalicBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ItalicBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ItalicBlock.java Sat Apr  9 23:15:28 2011
@@ -29,7 +29,7 @@ import java.util.List;
 class ItalicBlock
     extends AbstractFatherBlock
 {
-    ItalicBlock( List childBlocks )
+    ItalicBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/MonospaceBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/MonospaceBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/MonospaceBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/MonospaceBlock.java Sat Apr  9 23:15:28 2011
@@ -28,7 +28,7 @@ import java.util.List;
  */
 class MonospaceBlock extends AbstractFatherBlock
 {
-    MonospaceBlock( List childBlocks )
+    MonospaceBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/ParagraphBlock.java Sat Apr  9 23:15:28 2011
@@ -33,12 +33,12 @@ class ParagraphBlock
 
     private boolean generateParagraphTags = true;
 
-    ParagraphBlock( List blocks )
+    ParagraphBlock( List<Block> blocks )
     {
         super( blocks );
     }
 
-    ParagraphBlock( List blocks, boolean generateParagraphTags )
+    ParagraphBlock( List<Block> blocks, boolean generateParagraphTags )
     {
         super( blocks );
         this.generateParagraphTags = generateParagraphTags;

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/BulletedListBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/BulletedListBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/BulletedListBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/BulletedListBlock.java Sat Apr  9 23:15:28 2011
@@ -19,6 +19,7 @@ package org.apache.maven.doxia.module.co
  * under the License.
  */
 
+import org.apache.maven.doxia.module.confluence.parser.Block;
 import org.apache.maven.doxia.sink.Sink;
 
 import java.util.List;
@@ -30,7 +31,7 @@ import java.util.List;
 class BulletedListBlock
     extends ListBlock
 {
-    BulletedListBlock(  List childBlocks )
+    BulletedListBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListBlock.java Sat Apr  9 23:15:28 2011
@@ -20,6 +20,7 @@ package org.apache.maven.doxia.module.co
  */
 
 import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
+import org.apache.maven.doxia.module.confluence.parser.Block;
 
 import java.util.List;
 
@@ -30,7 +31,7 @@ import java.util.List;
 abstract class ListBlock
     extends AbstractFatherBlock
 {
-    ListBlock(  List childBlocks )
+    ListBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListItemBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListItemBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListItemBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/ListItemBlock.java Sat Apr  9 23:15:28 2011
@@ -20,6 +20,7 @@ package org.apache.maven.doxia.module.co
  */
 
 import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
+import org.apache.maven.doxia.module.confluence.parser.Block;
 import org.apache.maven.doxia.sink.Sink;
 
 import java.util.List;
@@ -30,14 +31,14 @@ import java.util.List;
 class ListItemBlock
     extends AbstractFatherBlock
 {
-    private  ListBlock innerList;
+    private ListBlock innerList;
 
-    ListItemBlock(  List blocks )
+    ListItemBlock( List<Block> blocks )
     {
         this( blocks, null );
     }
 
-    ListItemBlock(  List blocks,  ListBlock innerList )
+    ListItemBlock( List<Block> blocks, ListBlock innerList )
     {
         super( blocks );
 
@@ -45,13 +46,13 @@ class ListItemBlock
     }
 
     /** {@inheritDoc} */
-    public  void before(  Sink sink )
+    public  void before( Sink sink )
     {
         sink.listItem();
     }
 
     /** {@inheritDoc} */
-    public  void after(  Sink sink )
+    public void after( Sink sink )
     {
         if ( innerList != null )
         {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/NumberedListBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/NumberedListBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/NumberedListBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/NumberedListBlock.java Sat Apr  9 23:15:28 2011
@@ -19,6 +19,7 @@ package org.apache.maven.doxia.module.co
  * under the License.
  */
 
+import org.apache.maven.doxia.module.confluence.parser.Block;
 import org.apache.maven.doxia.sink.Sink;
 
 import java.util.List;
@@ -34,7 +35,7 @@ public class NumberedListBlock
     /**
      * @param childBlocks
      */
-    NumberedListBlock(  List childBlocks )
+    NumberedListBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeComponent.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeComponent.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeComponent.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeComponent.java Sat Apr  9 23:15:28 2011
@@ -21,7 +21,6 @@ package org.apache.maven.doxia.module.co
 
 import java.util.List;
 import java.util.ArrayList;
-import java.util.Iterator;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -31,7 +30,7 @@ class TreeComponent
 {
     private static final String EOL = System.getProperty( "line.separator" );
 
-    private List children = new ArrayList();
+    private List<TreeComponent> children = new ArrayList<TreeComponent>();
 
     private String text;
 
@@ -46,7 +45,7 @@ class TreeComponent
         this.type = type;
     }
 
-    List getChildren()
+    List<TreeComponent> getChildren()
     {
         return children;
     }
@@ -102,10 +101,8 @@ class TreeComponent
             sb.append( EOL );
         }
 
-        for ( Iterator i = children.iterator(); i.hasNext(); )
+        for ( TreeComponent lc : children )
         {
-            TreeComponent lc = (TreeComponent) i.next();
-
             sb.append( lc.toString( indent + "   " ) );
         }
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeListBuilder.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeListBuilder.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeListBuilder.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/list/TreeListBuilder.java Sat Apr  9 23:15:28 2011
@@ -20,9 +20,9 @@ package org.apache.maven.doxia.module.co
  */
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
+import org.apache.maven.doxia.module.confluence.parser.Block;
 import org.apache.maven.doxia.module.confluence.parser.ChildBlocksBuilder;
 
 /**
@@ -32,7 +32,7 @@ import org.apache.maven.doxia.module.con
  */
 public class TreeListBuilder
 {
-    private  TreeComponent root;
+    private TreeComponent root;
 
     private TreeComponent current;
 
@@ -56,7 +56,7 @@ public class TreeListBuilder
         else if ( incomingLevel > currentDepth )
         {
             // el actual ahora es el �ltimo que insert�
-            List components = current.getChildren();
+            List<TreeComponent> components = current.getChildren();
 
             if ( components.size() == 0 )
             {
@@ -71,7 +71,7 @@ public class TreeListBuilder
             }
             else
             {
-                current = (TreeComponent) components.get( components.size() - 1 );
+                current = components.get( components.size() - 1 );
             }
         }
         else
@@ -96,9 +96,9 @@ public class TreeListBuilder
 
     private ListBlock getList( TreeComponent treeComponent )
     {
-        List list = getListItems( treeComponent );
+        List<Block> list = getListItems( treeComponent );
 
-        int type = ( (TreeComponent) treeComponent.getChildren().get( 0 ) ).getType();
+        int type = treeComponent.getChildren().get( 0 ).getType();
 
         if ( type == ListBlockParser.BULLETED_LIST )
         {
@@ -108,15 +108,13 @@ public class TreeListBuilder
         return new NumberedListBlock( list );
     }
 
-    private List getListItems( TreeComponent tc )
+    private List<Block> getListItems( TreeComponent tc )
     {
-        List blocks = new ArrayList();
+        List<Block> blocks = new ArrayList<Block>();
 
-        for ( Iterator i = tc.getChildren().iterator(); i.hasNext(); )
+        for ( TreeComponent child : tc.getChildren() )
         {
-            TreeComponent child = (TreeComponent) i.next();
-
-            List childBlocks = new ArrayList();
+            List<Block> childBlocks = new ArrayList<Block>();
 
             if ( child.getFather() != null )
             {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlock.java Sat Apr  9 23:15:28 2011
@@ -20,6 +20,7 @@ package org.apache.maven.doxia.module.co
  */
 
 import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
+import org.apache.maven.doxia.module.confluence.parser.Block;
 import org.apache.maven.doxia.sink.Sink;
 
 import java.util.List;
@@ -30,7 +31,7 @@ import java.util.List;
 class TableBlock
     extends AbstractFatherBlock
 {
-    TableBlock( List childBlocks )
+    TableBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlockParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlockParser.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlockParser.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableBlockParser.java Sat Apr  9 23:15:28 2011
@@ -36,7 +36,6 @@ import org.apache.maven.doxia.module.con
 import org.apache.maven.doxia.parser.ParseException;
 import org.codehaus.plexus.util.StringUtils;
 
-
 /**
  * Parse tables
  *
@@ -65,7 +64,7 @@ public class TableBlockParser
             throw new IllegalAccessError( "call accept before this ;)" );
         }
 
-        List rows = new ArrayList();
+        List<Block> rows = new ArrayList<Block>();
 
         String l = line;
 
@@ -73,7 +72,7 @@ public class TableBlockParser
         {
             l = l.substring( 0, l.lastIndexOf( "|" ) );
 
-            List cells = new ArrayList();
+            List<Block> cells = new ArrayList<Block>();
 
             BlockParser headingParser = new SectionBlockParser();
             BlockParser figureParser = new FigureBlockParser();
@@ -87,12 +86,12 @@ public class TableBlockParser
 
                 for ( int i = 0; i < text.length; i++ )
                 {
-                    List textBlocks = new ArrayList();
+                    List<Block> textBlocks = new ArrayList<Block>();
 
                     textBlocks.add( ( ( ParagraphBlockParser) paragraphParser )
                             .visit(text[i], new ByLineReaderSource( new StringReader( EMPTY_STRING ) ), false ) );
 
-                    List blocks = new ArrayList();
+                    List<Block> blocks = new ArrayList<Block>();
 
                     blocks.add( new BoldBlock( textBlocks ) );
 
@@ -103,7 +102,7 @@ public class TableBlockParser
             {
                 int it = 0;
                 String[] text = StringUtils.split( l, "|" );
-                List texts = new LinkedList();
+                List<String> texts = new LinkedList<String>();
 
 
                 while ( it < text.length )
@@ -124,7 +123,7 @@ public class TableBlockParser
                 Object[] pText = texts.toArray();
                 for ( int i = 0; i < pText.length; i++ )
                 {
-                    List blocks = new ArrayList();
+                    List<Block> blocks = new ArrayList<Block>();
 
                     blocks.add( ( (ParagraphBlockParser) paragraphParser ).visit( (String) pText[i],
                             new ByLineReaderSource( new StringReader( EMPTY_STRING ) ), false ) );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellBlock.java Sat Apr  9 23:15:28 2011
@@ -20,6 +20,7 @@ package org.apache.maven.doxia.module.co
  */
 
 import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
+import org.apache.maven.doxia.module.confluence.parser.Block;
 import org.apache.maven.doxia.sink.Sink;
 
 import java.util.List;
@@ -30,7 +31,7 @@ import java.util.List;
 class TableCellBlock
     extends AbstractFatherBlock
 {
-    TableCellBlock( List childBlocks )
+    TableCellBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellHeaderBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellHeaderBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellHeaderBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableCellHeaderBlock.java Sat Apr  9 23:15:28 2011
@@ -20,6 +20,7 @@ package org.apache.maven.doxia.module.co
  */
 
 import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
+import org.apache.maven.doxia.module.confluence.parser.Block;
 import org.apache.maven.doxia.sink.Sink;
 
 import java.util.List;
@@ -30,7 +31,7 @@ import java.util.List;
 class TableCellHeaderBlock
     extends AbstractFatherBlock
 {
-    TableCellHeaderBlock( List childBlocks )
+    TableCellHeaderBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableRowBlock.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableRowBlock.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableRowBlock.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/parser/table/TableRowBlock.java Sat Apr  9 23:15:28 2011
@@ -20,6 +20,7 @@ package org.apache.maven.doxia.module.co
  */
 
 import org.apache.maven.doxia.module.confluence.parser.AbstractFatherBlock;
+import org.apache.maven.doxia.module.confluence.parser.Block;
 import org.apache.maven.doxia.sink.Sink;
 
 import java.util.List;
@@ -30,7 +31,7 @@ import java.util.List;
 class TableRowBlock
     extends AbstractFatherBlock
 {
-    TableRowBlock( List childBlocks )
+    TableRowBlock( List<Block> childBlocks )
     {
         super( childBlocks );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/pom.xml Sat Apr  9 23:15:28 2011
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>doxia-modules</artifactId>
     <groupId>org.apache.maven.doxia</groupId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookParser.java Sat Apr  9 23:15:28 2011
@@ -67,50 +67,50 @@ public class DocBookParser
     /**
      * A selective stack of parent elements
      */
-    private final Stack parent = new Stack();
+    private final Stack<String> parent = new Stack<String>();
 
     /**
      * The list of DocBook elements that introduce a new level of hierarchy.
      */
-    private static final Collection HIER_ELEMENTS = new HashSet();
+    private static final Collection<String> HIER_ELEMENTS = new HashSet<String>();
 
     /**
      * Simplified DocBook elements that are direct children of &lt;article&gt;
      * and that should be emitted into the Sink's head.
      */
-    private static final Collection META_ELEMENTS = new HashSet();
+    private static final Collection<String> META_ELEMENTS = new HashSet<String>();
 
     /**
      * Simplified DocBook elements that occur within &lt;articleinfo&gt;
      * and that are currently recognized by the parser.
      */
-    private static final Collection ARTICLEINFO_ELEMENTS = new HashSet();
+    private static final Collection<String> ARTICLEINFO_ELEMENTS = new HashSet<String>();
 
     /**
      * The list of DocBook elements that will be rendered verbatim
      */
-    private static final Collection VERBATIM_ELEMENTS = new HashSet();
+    private static final Collection<String> VERBATIM_ELEMENTS = new HashSet<String>();
 
     /**
      * The list of DocBook elements that will be rendered inline and bold
      */
-    private static final Collection BOLD_ELEMENTS = new HashSet();
+    private static final Collection<String> BOLD_ELEMENTS = new HashSet<String>();
 
     /**
      * The list of DocBook elements that will be rendered inline and italic
      */
-    private static final Collection ITALIC_ELEMENTS = new HashSet();
+    private static final Collection<String> ITALIC_ELEMENTS = new HashSet<String>();
 
     /**
      * The list of DocBook elements that will be rendered inline and monospace
      */
-    private static final Collection MONOSPACE_ELEMENTS = new HashSet();
+    private static final Collection<String> MONOSPACE_ELEMENTS = new HashSet<String>();
 
     /**
      * The list of DocBook elements that may be ignored, either because they don't
      * require any special processing or because they are not yet implemented.
      */
-    private static final Collection IGNORABLE_ELEMENTS = new HashSet();
+    private static final Collection<String> IGNORABLE_ELEMENTS = new HashSet<String>();
     static
     {
         META_ELEMENTS.add( SimplifiedDocbookMarkup.ARTICLEINFO_TAG.toString() );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java Sat Apr  9 23:15:28 2011
@@ -23,7 +23,6 @@ import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.io.Writer;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -154,7 +153,7 @@ public class DocBookSink
 
     /** Map of warn messages with a String as key to describe the error type and a Set as value.
      * Using to reduce warn messages. */
-    private Map warnMessages;
+    private Map<String, Set<String>> warnMessages;
 
     /**
      * Constructor, initialize the Writer.
@@ -1591,7 +1590,7 @@ public class DocBookSink
     /**
      * {@inheritDoc}
      *
-     * Unkown events just log a warning message but are ignored otherwise.
+     * Unknown events just log a warning message but are ignored otherwise.
      * @see org.apache.maven.doxia.sink.Sink#unknown(String,Object[],SinkEventAttributes)
      */
     public void unknown( String name, Object[] requiredParams, SinkEventAttributes attributes )
@@ -1656,16 +1655,10 @@ public class DocBookSink
 
         if ( getLog().isWarnEnabled() && this.warnMessages != null )
         {
-            for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); )
+            for ( Map.Entry<String, Set<String>> entry : this.warnMessages.entrySet() )
             {
-                Map.Entry entry = (Map.Entry) it.next();
-
-                Set set = (Set) entry.getValue();
-
-                for ( Iterator it2 = set.iterator(); it2.hasNext(); )
+                for ( String msg : entry.getValue() )
                 {
-                    String msg = (String) it2.next();
-
                     getLog().warn( msg );
                 }
             }
@@ -1711,13 +1704,13 @@ public class DocBookSink
 
         if ( warnMessages == null )
         {
-            warnMessages = new HashMap();
+            warnMessages = new HashMap<String, Set<String>>();
         }
 
-        Set set = (Set) warnMessages.get( key );
+        Set<String> set = warnMessages.get( key );
         if ( set == null )
         {
-            set = new TreeSet();
+            set = new TreeSet<String>();
         }
         set.add( msg );
         warnMessages.put( key, set );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/pom.xml Sat Apr  9 23:15:28 2011
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>doxia-modules</artifactId>
     <groupId>org.apache.maven.doxia</groupId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 

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=1090706&r1=1090705&r2=1090706&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 Sat Apr  9 23:15:28 2011
@@ -78,7 +78,7 @@ public class FmlParser
 
     /** Map of warn messages with a String as key to describe the error type and a Set as value.
      * Using to reduce warn messages. */
-    private Map warnMessages;
+    private Map<String, Set<String>> warnMessages;
 
     /** The source content of the input reader. Used to pass into macros. */
     private String sourceContent;
@@ -87,7 +87,7 @@ public class FmlParser
     private String macroName;
 
     /** The macro parameters. */
-    private Map macroParameters = new HashMap();
+    private Map<String, Object> macroParameters = new HashMap<String, Object>();
 
     /** {@inheritDoc} */
     public void parse( Reader source, Sink sink )
@@ -460,7 +460,7 @@ public class FmlParser
 
             if ( macroParameters == null )
             {
-                macroParameters = new HashMap();
+                macroParameters = new HashMap<String, Object>();
             }
 
             if ( StringUtils.isEmpty( macroName ) )
@@ -577,10 +577,8 @@ public class FmlParser
         // Write summary
         // ----------------------------------------------------------------------
 
-        for ( Iterator partIterator = faqs.getParts().iterator(); partIterator.hasNext(); )
+        for ( Part part : faqs.getParts() )
         {
-            Part part = (Part) partIterator.next();
-
             if ( StringUtils.isNotEmpty( part.getTitle() ) )
             {
                 sink.paragraph();
@@ -592,9 +590,8 @@ public class FmlParser
 
             sink.numberedList( Sink.NUMBERING_DECIMAL );
 
-            for ( Iterator faqIterator = part.getFaqs().iterator(); faqIterator.hasNext(); )
+            for ( Faq faq : part.getFaqs() )
             {
-                Faq faq = (Faq) faqIterator.next();
                 sink.numberedListItem();
                 sink.link( "#" + faq.getId() );
 
@@ -620,10 +617,8 @@ public class FmlParser
         // Write content
         // ----------------------------------------------------------------------
 
-        for ( Iterator partIterator = faqs.getParts().iterator(); partIterator.hasNext(); )
+        for ( Part part : faqs.getParts() )
         {
-            Part part = (Part) partIterator.next();
-
             if ( StringUtils.isNotEmpty( part.getTitle() ) )
             {
                 sink.section1();
@@ -635,9 +630,9 @@ public class FmlParser
 
             sink.definitionList();
 
-            for ( Iterator faqIterator = part.getFaqs().iterator(); faqIterator.hasNext(); )
+            for ( Iterator<Faq> faqIterator = part.getFaqs().iterator(); faqIterator.hasNext(); )
             {
-                Faq faq = (Faq) faqIterator.next();
+                Faq faq = faqIterator.next();
 
                 sink.definedTerm();
                 sink.anchor( faq.getId() );
@@ -725,13 +720,13 @@ public class FmlParser
 
         if ( warnMessages == null )
         {
-            warnMessages = new HashMap();
+            warnMessages = new HashMap<String, Set<String>>();
         }
 
-        Set set = (Set) warnMessages.get( key );
+        Set<String> set = warnMessages.get( key );
         if ( set == null )
         {
-            set = new TreeSet();
+            set = new TreeSet<String>();
         }
         set.add( msg );
         warnMessages.put( key, set );
@@ -744,15 +739,10 @@ public class FmlParser
     {
         if ( getLog().isWarnEnabled() && this.warnMessages != null && !isSecondParsing() )
         {
-            for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); )
+            for ( Map.Entry<String, Set<String>> entry : this.warnMessages.entrySet() )
             {
-                Map.Entry entry = (Map.Entry) it.next();
-
-                Set set = (Set) entry.getValue();
-                for ( Iterator it2 = set.iterator(); it2.hasNext(); )
+                for ( String msg : entry.getValue() )
                 {
-                    String msg = (String) it2.next();
-
                     getLog().warn( msg );
                 }
             }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml Sat Apr  9 23:15:28 2011
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>doxia-modules</artifactId>
     <groupId>org.apache.maven.doxia</groupId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java Sat Apr  9 23:15:28 2011
@@ -24,7 +24,6 @@ import java.io.Writer;
 
 import java.util.Calendar;
 import java.util.Date;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
@@ -110,7 +109,7 @@ public class FoAggregateSink
     private int tocPosition;
 
     /** Used to get the current position in the TOC. */
-    private final Stack tocStack = new Stack();
+    private final Stack<NumberedListItem> tocStack = new Stack<NumberedListItem>();
 
     /**
      * Constructor.
@@ -302,7 +301,7 @@ public class FoAggregateSink
             DocumentTOCItem tocItem = new DocumentTOCItem();
             tocItem.setName( this.docModel.getToc().getName() );
             tocItem.setRef( "./toc" );
-            List items = new LinkedList();
+            List<DocumentTOCItem> items = new LinkedList<DocumentTOCItem>();
             if ( this.tocPosition == TOC_START )
             {
                 items.add( tocItem );
@@ -879,7 +878,7 @@ public class FoAggregateSink
         writeEndTag( PAGE_SEQUENCE_TAG );
     }
 
-    private void writeTocItems( List tocItems, int level )
+    private void writeTocItems( List<DocumentTOCItem> tocItems, int level )
     {
         final int maxTocLevel = 4;
 
@@ -890,10 +889,8 @@ public class FoAggregateSink
 
         tocStack.push( new NumberedListItem( NUMBERING_DECIMAL ) );
 
-        for ( Iterator k = tocItems.iterator(); k.hasNext(); )
+        for ( DocumentTOCItem tocItem : tocItems )
         {
-            DocumentTOCItem tocItem = (DocumentTOCItem) k.next();
-
             String ref = getIdName( tocItem.getRef() );
 
             writeStartTag( TABLE_ROW_TAG, "keep-with-next", "auto" );
@@ -980,12 +977,10 @@ public class FoAggregateSink
         writeEndTag( BOOKMARK_TREE_TAG );
     }
 
-    private void renderBookmarkItems( List items )
+    private void renderBookmarkItems( List<DocumentTOCItem> items )
     {
-        for ( Iterator k = items.iterator(); k.hasNext(); )
+        for ( DocumentTOCItem tocItem : items )
         {
-            DocumentTOCItem tocItem = (DocumentTOCItem) k.next();
-
             String ref = getIdName( tocItem.getRef() );
 
             writeStartTag( BOOKMARK_TAG, "internal-destination", ref );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoConfiguration.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoConfiguration.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoConfiguration.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoConfiguration.java Sat Apr  9 23:15:28 2011
@@ -48,7 +48,7 @@ public class FoConfiguration
     private final XMLConfiguration config;
 
     /** The list of attribute sets. */
-    private List sets;
+    private List<?> sets;
 
     /**
      * Constructor.
@@ -160,8 +160,8 @@ public class FoConfiguration
 
         if ( prop instanceof List )
         {
-            List values = (List) prop;
-            List keys = config.getList( keybase + ".xsl:attribute[@name]" );
+            List<?> values = (List<?>) prop;
+            List<?> keys = config.getList( keybase + ".xsl:attribute[@name]" );
 
             for ( int i = 0; i < values.size(); i++ )
             {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java Sat Apr  9 23:15:28 2011
@@ -26,7 +26,6 @@ import java.io.StringWriter;
 import java.io.Writer;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.Map;
 import java.util.Set;
@@ -69,7 +68,7 @@ public class FoSink
     private final PrintWriter out;
 
     /** Used to get the current position in numbered lists. */
-    private final Stack listStack;
+    private final Stack<NumberedListItem> listStack;
 
     /** Used to get attributes for a given FO element. */
     private final FoConfiguration config;
@@ -94,30 +93,30 @@ public class FoSink
     private final String languageId;
 
     /** Stack of drawing borders on table cells. */
-    private final LinkedList tableGridStack;
+    private final LinkedList<Boolean> tableGridStack;
 
     /** Stack of alignment int[] of table cells. */
-    private final LinkedList cellJustifStack;
+    private final LinkedList<int[]> cellJustifStack;
 
     /** Stack of justification of table cells. */
-    private final LinkedList isCellJustifStack;
+    private final LinkedList<Boolean> isCellJustifStack;
 
     /** Stack of current table cell. */
-    private final LinkedList cellCountStack;
+    private final LinkedList<Integer> cellCountStack;
 
     /** The stack of StringWriter to write the table result temporary, so we could play with the output and fix fo. */
-    private final LinkedList tableContentWriterStack;
+    private final LinkedList<StringWriter> tableContentWriterStack;
 
-    private final LinkedList tableCaptionWriterStack;
+    private final LinkedList<StringWriter> tableCaptionWriterStack;
 
-    private final LinkedList tableCaptionXMLWriterStack;
+    private final LinkedList<PrettyPrintXMLWriter> tableCaptionXMLWriterStack;
 
     /** The stack of table caption */
-    private final LinkedList tableCaptionStack;
+    private final LinkedList<String> tableCaptionStack;
 
     /** Map of warn messages with a String as key to describe the error type and a Set as value.
      * Using to reduce warn messages. */
-    protected Map warnMessages;
+    protected Map<String, Set<String>> warnMessages;
 
     /**
      * Constructor, initialize the Writer.
@@ -164,15 +163,15 @@ public class FoSink
         this.languageId = languageId;
         this.config = new FoConfiguration();
 
-        this.listStack = new Stack();
-        this.tableGridStack = new LinkedList();
-        this.cellJustifStack = new LinkedList();
-        this.isCellJustifStack = new LinkedList();
-        this.cellCountStack = new LinkedList();
-        this.tableContentWriterStack = new LinkedList();
-        this.tableCaptionWriterStack = new LinkedList();
-        this.tableCaptionXMLWriterStack = new LinkedList();
-        this.tableCaptionStack = new LinkedList();
+        this.listStack = new Stack<NumberedListItem>();
+        this.tableGridStack = new LinkedList<Boolean>();
+        this.cellJustifStack = new LinkedList<int[]>();
+        this.isCellJustifStack = new LinkedList<Boolean>();
+        this.cellCountStack = new LinkedList<Integer>();
+        this.tableContentWriterStack = new LinkedList<StringWriter>();
+        this.tableCaptionWriterStack = new LinkedList<StringWriter>();
+        this.tableCaptionXMLWriterStack = new LinkedList<PrettyPrintXMLWriter>();
+        this.tableCaptionStack = new LinkedList<String>();
 
         setNameSpace( "fo" );
     }
@@ -1341,16 +1340,10 @@ public class FoSink
 
         if ( getLog().isWarnEnabled() && this.warnMessages != null )
         {
-            for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); )
+            for ( Map.Entry<String, Set<String>> entry : this.warnMessages.entrySet() )
             {
-                Map.Entry entry = (Map.Entry) it.next();
-
-                Set set = (Set) entry.getValue();
-
-                for ( Iterator it2 = set.iterator(); it2.hasNext(); )
+                for ( String msg : entry.getValue() )
                 {
-                    String msg = (String) it2.next();
-
                     getLog().warn( msg );
                 }
             }
@@ -1562,11 +1555,11 @@ public class FoSink
     {
         if ( !this.tableCaptionXMLWriterStack.isEmpty() && this.tableCaptionXMLWriterStack.getLast() != null )
         {
-            ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).writeText( unifyEOLs( text ) );
+            this.tableCaptionXMLWriterStack.getLast().writeText( unifyEOLs( text ) );
         }
         else if ( !this.tableContentWriterStack.isEmpty() && this.tableContentWriterStack.getLast() != null )
         {
-            ( (StringWriter) this.tableContentWriterStack.getLast() ).write( unifyEOLs( text ) );
+            this.tableContentWriterStack.getLast().write( unifyEOLs( text ) );
         }
         else
         {
@@ -1664,24 +1657,23 @@ public class FoSink
         else
         {
             String tag = ( getNameSpace() != null ? getNameSpace() + ":" : "" ) + t.toString();
-            ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).startElement( tag );
+            this.tableCaptionXMLWriterStack.getLast().startElement( tag );
 
             if ( att != null )
             {
-                Enumeration names = att.getAttributeNames();
+                Enumeration<?> names = att.getAttributeNames();
                 while ( names.hasMoreElements() )
                 {
                     Object key = names.nextElement();
                     Object value = att.getAttribute( key );
 
-                    ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() )
-                            .addAttribute( key.toString(), value.toString() );
+                    this.tableCaptionXMLWriterStack.getLast().addAttribute( key.toString(), value.toString() );
                 }
             }
 
             if ( isSimpleTag )
             {
-                ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).endElement();
+                this.tableCaptionXMLWriterStack.getLast().endElement();
             }
         }
     }
@@ -1695,7 +1687,7 @@ public class FoSink
         }
         else
         {
-            ( (PrettyPrintXMLWriter) this.tableCaptionXMLWriterStack.getLast() ).endElement();
+            this.tableCaptionXMLWriterStack.getLast().endElement();
         }
     }
 
@@ -1794,13 +1786,13 @@ public class FoSink
 
         if ( warnMessages == null )
         {
-            warnMessages = new HashMap();
+            warnMessages = new HashMap<String, Set<String>>();
         }
 
-        Set set = (Set) warnMessages.get( key );
+        Set<String> set = warnMessages.get( key );
         if ( set == null )
         {
-            set = new TreeSet();
+            set = new TreeSet<String>();
         }
         set.add( msg );
         warnMessages.put( key, set );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/pom.xml Sat Apr  9 23:15:28 2011
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>doxia-modules</artifactId>
     <groupId>org.apache.maven.doxia</groupId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/ITextSink.java Sat Apr  9 23:15:28 2011
@@ -33,7 +33,6 @@ import java.io.Writer;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -50,7 +49,6 @@ import org.codehaus.plexus.util.StringUt
 import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
 import org.codehaus.plexus.util.xml.XMLWriter;
 
-
 /**
  * <p>A doxia Sink which produces an XML Front End document for <code>iText</code> framework.</p>
  * Known limitations:
@@ -121,7 +119,7 @@ public class ITextSink
 
     /** Map of warn messages with a String as key to describe the error type and a Set as value.
      * Using to reduce warn messages. */
-    private Map warnMessages;
+    private Map<String, Set<String>> warnMessages;
 
     /**
      * <p>Constructor for ITextSink.</p>
@@ -200,16 +198,10 @@ public class ITextSink
     {
         if ( getLog().isWarnEnabled() && this.warnMessages != null )
         {
-            for ( Iterator it = this.warnMessages.entrySet().iterator(); it.hasNext(); )
+            for ( Map.Entry<String, Set<String>> entry : this.warnMessages.entrySet() )
             {
-                Map.Entry entry = (Map.Entry) it.next();
-
-                Set set = (Set) entry.getValue();
-
-                for ( Iterator it2 = set.iterator(); it2.hasNext(); )
+                for ( String msg : entry.getValue() )
                 {
-                    String msg = (String) it2.next();
-
                     getLog().warn( msg );
                 }
             }
@@ -1815,13 +1807,13 @@ public class ITextSink
 
         if ( warnMessages == null )
         {
-            warnMessages = new HashMap();
+            warnMessages = new HashMap<String, Set<String>>();
         }
 
-        Set set = (Set) warnMessages.get( key );
+        Set<String> set = warnMessages.get( key );
         if ( set == null )
         {
-            set = new TreeSet();
+            set = new TreeSet<String>();
         }
         set.add( msg );
         warnMessages.put( key, set );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java Sat Apr  9 23:15:28 2011
@@ -114,7 +114,7 @@ public class SinkActionContext
     /** Constant <code>UNDEFINED=82</code> */
     public static final int UNDEFINED = 82;
 
-    private Stack stack = new Stack();
+    private Stack<Integer> stack = new Stack<Integer>();
 
     private int currentAction;
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-latex/pom.xml Sat Apr  9 23:15:28 2011
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>doxia-modules</artifactId>
     <groupId>org.apache.maven.doxia</groupId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/pom.xml Sat Apr  9 23:15:28 2011
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>doxia-modules</artifactId>
     <groupId>org.apache.maven.doxia</groupId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/FontMetrics.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/FontMetrics.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/FontMetrics.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-rtf/src/main/java/org/apache/maven/doxia/module/rtf/FontMetrics.java Sat Apr  9 23:15:28 2011
@@ -69,7 +69,7 @@ class FontMetrics
         }
 
         String className = buf.toString();
-        Class classObject = Class.forName( className );
+        Class<?> classObject = Class.forName( className );
         return (FontMetrics) classObject.newInstance();
     }
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/pom.xml?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/pom.xml Sat Apr  9 23:15:28 2011
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>doxia-modules</artifactId>
     <groupId>org.apache.maven.doxia</groupId>
-    <version>1.1.5-SNAPSHOT</version>
+    <version>1.2-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java Sat Apr  9 23:15:28 2011
@@ -39,7 +39,6 @@ import org.apache.maven.doxia.util.ByLin
 
 import java.io.Reader;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -102,20 +101,18 @@ public class TWikiParser
      * @return the blocks that represent source.
      * @throws org.apache.maven.doxia.parser.ParseException on error.
      */
-    public final List parse( final ByLineSource source )
+    public final List<Block> parse( final ByLineSource source )
         throws ParseException
     {
-        final List ret = new ArrayList();
+        final List<Block> ret = new ArrayList<Block>();
 
         String line;
         while ( ( line = source.getNextLine() ) != null )
         {
             boolean accepted = false;
 
-            for ( int i = 0; i < parsers.length; i++ )
+            for ( BlockParser parser : parsers )
             {
-                final BlockParser parser = parsers[i];
-
                 if ( parser.accept( line ) )
                 {
                     accepted = true;
@@ -138,7 +135,7 @@ public class TWikiParser
     {
         init();
 
-        List blocks;
+        List<Block> blocks;
         final ByLineSource src = new ByLineReaderSource( source );
 
         try
@@ -163,10 +160,8 @@ public class TWikiParser
 
         sink.head_();
         sink.body();
-        for ( Iterator it = blocks.iterator(); it.hasNext(); )
+        for ( Block block : blocks )
         {
-            final Block block = (Block) it.next();
-
             block.traverse( sink );
         }
         sink.body_();
@@ -187,18 +182,17 @@ public class TWikiParser
      * @return a title for a page
      * @since 1.1
      */
-    public final String getTitle( final List blocks, final ByLineSource source )
+    public final String getTitle( final List<Block> blocks, final ByLineSource source )
     {
         String title = null;
 
-        for ( Iterator it = blocks.iterator(); title == null && it.hasNext(); )
+        for ( Block block : blocks )
         {
-            final Block block = (Block) it.next();
-
             if ( block instanceof SectionBlock )
             {
                 final SectionBlock sectionBlock = (SectionBlock) block;
                 title = sectionBlock.getTitle();
+                break;
             }
         }
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiSink.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiSink.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiSink.java Sat Apr  9 23:15:28 2011
@@ -66,7 +66,7 @@ public class TWikiSink
     private int levelList = 0;
 
     /**  listStyles. */
-    private final Stack listStyles;
+    private final Stack<String> listStyles;
 
     /**
      * Constructor, initialize the Writer and the variables.
@@ -77,7 +77,7 @@ public class TWikiSink
     protected TWikiSink( Writer writer )
     {
         this.out = new PrintWriter( writer );
-        this.listStyles = new Stack();
+        this.listStyles = new Stack<String>();
 
         init();
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/FormatedTextParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/FormatedTextParser.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/FormatedTextParser.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/FormatedTextParser.java Sat Apr  9 23:15:28 2011
@@ -40,7 +40,7 @@ public class FormatedTextParser
     /**
      * map used to create blocks dependening on the text format
      */
-    private static final Map FACTORY_MAP = new HashMap();
+    private static final Map<String, FormatBlockFactory> FACTORY_MAP = new HashMap<String, FormatBlockFactory>();
 
     /**
      * creates bold blocks
@@ -122,7 +122,7 @@ public class FormatedTextParser
      */
     final Block[] parse( final String line )
     {
-        return (Block[]) parseFormat( line ).toArray( new Block[] {} );
+        return parseFormat( line ).toArray( new Block[] {} );
     }
 
     /**
@@ -161,9 +161,9 @@ public class FormatedTextParser
      * @param line line to parse
      * @return list of blocks
      */
-    private List parseFormat( final String line )
+    private List<Block> parseFormat( final String line )
     {
-        final List ret = new ArrayList();
+        final List<Block> ret = new ArrayList<Block>();
         final int[] lhOffsets = new int[SPECIAL_CHAR.length];
         final int[] rhOffsets = new int[SPECIAL_CHAR.length];
 
@@ -259,8 +259,8 @@ public class FormatedTextParser
         {
             int len = SPECIAL_CHAR[charType].length();
             ret.addAll( parseFormat( line.substring( 0, minIndex ) ) );
-            ret.add( ( (FormatBlockFactory) FACTORY_MAP.get( SPECIAL_CHAR[charType] ) )
-                     .createBlock( (Block[]) parseFormat( line.substring( minIndex + len, rhOffsets[charType] ) )
+            ret.add( FACTORY_MAP.get( SPECIAL_CHAR[charType] )
+                     .createBlock( parseFormat( line.substring( minIndex + len, rhOffsets[charType] ) )
                                    .toArray( new Block[] {} ) ) );
             ret.addAll( parseFormat( line.substring( rhOffsets[charType] + len ) ) );
         }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/GenericListBlockParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/GenericListBlockParser.java?rev=1090706&r1=1090705&r2=1090706&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/GenericListBlockParser.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/GenericListBlockParser.java Sat Apr  9 23:15:28 2011
@@ -24,7 +24,6 @@ import org.apache.maven.doxia.parser.Par
 import org.apache.maven.doxia.sink.Sink;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -366,7 +365,7 @@ class TreeListBuilder
      */
     private ListBlock getList( final TreeComponent tc )
     {
-        ListItemBlock[] li = (ListItemBlock[]) getListItems( tc ).toArray( new ListItemBlock[] {} );
+        ListItemBlock[] li = getListItems( tc ).toArray( new ListItemBlock[] {} );
         return tc.getChildren()[0].getType().createList( li );
     }
 
@@ -374,9 +373,9 @@ class TreeListBuilder
      * @param tc tree
      * @return list Block for this tree
      */
-    private List getListItems( final TreeComponent tc )
+    private List<ListItemBlock> getListItems( final TreeComponent tc )
     {
-        final List blocks = new ArrayList();
+        final List<ListItemBlock> blocks = new ArrayList<ListItemBlock>();
 
         for ( int i = 0; i < tc.getChildren().length; i++ )
         {
@@ -412,7 +411,7 @@ class TreeListBuilder
         /**
          * childrens
          */
-        private List children = new ArrayList();
+        private List<TreeComponent> children = new ArrayList<TreeComponent>();
 
         /**
          * node text
@@ -513,9 +512,8 @@ class TreeListBuilder
                 sb.append( text );
                 sb.append( GenericListBlockParser.EOL );
             }
-            for ( Iterator it = children.iterator(); it.hasNext(); )
+            for ( TreeComponent lc : children )
             {
-                TreeComponent lc = (TreeComponent) it.next();
                 sb.append( lc.toString( indent + "   " ) );
             }
             return sb.toString();



Mime
View raw message