maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r1091053 [1/2] - in /maven/doxia/doxia/trunk/doxia-modules: doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/ doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/ doxia-module-confluence/src/main/java/org/apache...
Date Mon, 11 Apr 2011 12:55:08 GMT
Author: ltheussl
Date: Mon Apr 11 12:55:07 2011
New Revision: 1091053

URL: http://svn.apache.org/viewvc?rev=1091053&view=rev
Log:
more generics

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoConfiguration.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java

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=1091053&r1=1091052&r2=1091053&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 Mon Apr 11 12:55:07 2011
@@ -440,7 +440,7 @@ public class AptSink
     /** {@inheritDoc} */
     public void numberedListItem()
     {
-        String style = (String) listStyles.peek();
+        String style = listStyles.peek();
         if ( style.equals( String.valueOf( STAR ) ) )
         {
             write( EOL + listNestingIndent + String.valueOf( STAR ) + String.valueOf( SPACE ) );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java?rev=1091053&r1=1091052&r2=1091053&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java Mon Apr 11 12:55:07 2011
@@ -46,7 +46,7 @@ public class AptParserTest
 
     private AptParser parser;
 
-    /** {@inheritDoc} */
+    @Override
     protected void setUp()
         throws Exception
     {
@@ -131,32 +131,32 @@ public class AptParserTest
             IOUtil.close( reader );
         }
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "list", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "verbatim", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
+        assertEquals( "list", ( it.next() ).getName() );
+        assertEquals( "listItem", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "verbatim", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "verbatim_", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "listItem_", ( it.next() ).getName() );
+        assertEquals( "listItem", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "verbatim", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "verbatim_", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "listItem_", ( it.next() ).getName() );
+        assertEquals( "list_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
 
         assertFalse( it.hasNext() );
     }
@@ -211,28 +211,28 @@ public class AptParserTest
 
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
 
-        SinkEventElement element = (SinkEventElement) it.next();
+        SinkEventElement element = it.next();
         assertEquals( "verbatim", element.getName() );
         Object[] args = element.getArgs();
         assertEquals( SinkEventAttributeSet.BOXED, args[0] );
 
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "verbatim_", ( it.next() ).getName() );
 
-        element = (SinkEventElement) it.next();
+        element = it.next();
         assertEquals( "verbatim", element.getName() );
         args = element.getArgs();
         assertNull( args[0] );
 
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "verbatim_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "verbatim_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
 
         assertFalse( it.hasNext() );
     }
@@ -256,81 +256,81 @@ public class AptParserTest
 
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
-
-        assertEquals( "table", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() );
-
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        SinkEventElement element = (SinkEventElement) it.next();
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
+
+        assertEquals( "table", ( it.next() ).getName() );
+        assertEquals( "tableRows", ( it.next() ).getName() );
+
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        SinkEventElement element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 1, 1", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 1,2", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 1,3", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
 
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 2,1", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 2, 2", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 2,3", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
 
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 3,1", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 3,2", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 3, 3", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
 
-        assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableRows_", ( it.next() ).getName() );
+        assertEquals( "table_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
 
         assertFalse( it.hasNext() );
     }
@@ -354,96 +354,96 @@ public class AptParserTest
 
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
-
-        assertEquals( "table", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() );
-
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        SinkEventElement element = (SinkEventElement) it.next();
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
+
+        assertEquals( "table", ( it.next() ).getName() );
+        assertEquals( "tableRows", ( it.next() ).getName() );
+
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        SinkEventElement element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 1,\u00A0", element.getArgs()[0] );
-        assertEquals( "lineBreak", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "lineBreak", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "1", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 1,2", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 1,3", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
 
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 2,1", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 2,\u00A0", element.getArgs()[0] );
-        assertEquals( "lineBreak", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "lineBreak", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "2", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 2,3", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
 
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 3,1", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 3,2", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "cell 3,\u00A0", element.getArgs()[0] );
-        assertEquals( "lineBreak", ( (SinkEventElement) it.next() ).getName() );
-        element = (SinkEventElement) it.next();
+        assertEquals( "lineBreak", ( it.next() ).getName() );
+        element = it.next();
         assertEquals( "text", element.getName() );
         assertNotNull( element.getArgs()[0] );
         assertEquals( "3", element.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
 
-        assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableRows_", ( it.next() ).getName() );
+        assertEquals( "table_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
 
         assertFalse( it.hasNext() );
     }
@@ -463,78 +463,78 @@ public class AptParserTest
 
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
 
-        assertEquals( "table", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "table", ( it.next() ).getName() );
+        assertEquals( "tableRows", ( it.next() ).getName() );
 
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        SinkEventElement event = (SinkEventElement) it.next();
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        SinkEventElement event = it.next();
         assertEquals( "tableCell", event.getName() );
         SinkEventAttributeSet atts = (SinkEventAttributeSet) event.getArgs()[0];
         assertEquals( "center", atts.getAttribute( SinkEventAttributeSet.ALIGN ) );
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertNotNull( event.getArgs()[0] );
         assertEquals( "Centered", event.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        event = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        event = it.next();
         assertEquals( "tableCell", event.getName() );
         atts = (SinkEventAttributeSet) event.getArgs()[0];
         assertEquals( "center", atts.getAttribute( SinkEventAttributeSet.ALIGN ) );
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertNotNull( event.getArgs()[0] );
         assertEquals( "Centered", event.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        event = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        event = it.next();
         assertEquals( "tableCell", event.getName() );
         atts = (SinkEventAttributeSet) event.getArgs()[0];
         assertEquals( "center", atts.getAttribute( SinkEventAttributeSet.ALIGN ) );
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertNotNull( event.getArgs()[0] );
         assertEquals( "Centered", event.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
 
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        event = (SinkEventElement) it.next();
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        event = it.next();
         assertEquals( "tableCell", event.getName() );
         atts = (SinkEventAttributeSet) event.getArgs()[0];
         assertEquals( "center", atts.getAttribute( SinkEventAttributeSet.ALIGN ) );
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertNotNull( event.getArgs()[0] );
         assertEquals( "Centered", event.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        event = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        event = it.next();
         assertEquals( "tableCell", event.getName() );
         atts = (SinkEventAttributeSet) event.getArgs()[0];
         assertEquals( "left", atts.getAttribute( SinkEventAttributeSet.ALIGN ) );
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertNotNull( event.getArgs()[0] );
         assertEquals( "Left-aligned", event.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        event = (SinkEventElement) it.next();
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        event = it.next();
         assertEquals( "tableCell", event.getName() );
         atts = (SinkEventAttributeSet) event.getArgs()[0];
         assertEquals( "right", atts.getAttribute( SinkEventAttributeSet.ALIGN ) );
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertNotNull( event.getArgs()[0] );
         assertEquals( "Right-aligned", event.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
 
-        assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableRows_", ( it.next() ).getName() );
+        assertEquals( "table_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
 
         assertFalse( it.hasNext() );
     }
@@ -554,30 +554,30 @@ public class AptParserTest
         SinkEventTestingSink sink = new SinkEventTestingSink();
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
 
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        SinkEventElement event = (SinkEventElement) it.next();
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        SinkEventElement event = it.next();
         assertEquals( "text", event.getName() );
         assertEquals( "~ = - + * [ ] < > { } \\", event.getArgs()[0] );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
 
-        assertEquals( "table", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "table", ( it.next() ).getName() );
+        assertEquals( "tableRows", ( it.next() ).getName() );
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
 
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertEquals( "~ = - + * [ ] < > { } \\", event.getArgs()[0] );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
     }
 
     /** @throws Exception  */
@@ -592,41 +592,41 @@ public class AptParserTest
 
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
 
-        SinkEventElement event = (SinkEventElement) it.next();
+        SinkEventElement event = it.next();
         assertEquals( "anchor", event.getName() );
         assertEquals( "Anchor_with_spaces_and_brackets", event.getArgs()[0] );
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertEquals( "Anchor with spaces (and brackets)", event.getArgs()[0] );
-        assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "anchor_", ( it.next() ).getName() );
 
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        event = (SinkEventElement) it.next();
+        assertEquals( "text", ( it.next() ).getName() );
+        event = it.next();
         assertEquals( "link", event.getName() );
         assertEquals( "#Anchor_with_spaces_and_brackets", event.getArgs()[0] );
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertEquals( "Anchor with spaces (and brackets)", event.getArgs()[0] );
-        assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "link_", ( it.next() ).getName() );
 
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        event = (SinkEventElement) it.next();
+        assertEquals( "text", ( it.next() ).getName() );
+        event = it.next();
         assertEquals( "link", event.getName() );
         assertEquals( "http://fake.api#method(with, args)", event.getArgs()[0] );
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "text", event.getName() );
         assertEquals( "method(with, args)", event.getArgs()[0] );
-        assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "link_", ( it.next() ).getName() );
 
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
 
         assertFalse( it.hasNext() );
     }
@@ -643,27 +643,27 @@ public class AptParserTest
 
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
-
-        assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() );
-
-        assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
+
+        assertEquals( "section1", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1_", ( it.next() ).getName() );
+        assertEquals( "section1_", ( it.next() ).getName() );
+
+        assertEquals( "section1", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1", ( it.next() ).getName() );
+        assertEquals( "anchor", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "anchor_", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1_", ( it.next() ).getName() );
+        assertEquals( "section1_", ( it.next() ).getName() );
 
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
 
         assertFalse( it.hasNext() );
     }

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=1091053&r1=1091052&r2=1091053&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 Mon Apr 11 12:55:07 2011
@@ -557,7 +557,7 @@ public class ConfluenceSink
     public void numberedListItem()
     {
         writeEOL( true );
-        String style = (String) listStyles.peek();
+        String style = listStyles.peek();
         write( style + SPACE );
     }
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.java?rev=1091053&r1=1091052&r2=1091053&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/test/java/org/apache/maven/doxia/module/docbook/DocBookParserTest.java Mon Apr 11 12:55:07 2011
@@ -43,7 +43,7 @@ public class DocBookParserTest extends A
     /** The parser to test. */
     private DocBookParser parser;
 
-    /** {@inheritDoc} */
+    @Override
     protected void setUp()
         throws Exception
     {
@@ -110,21 +110,21 @@ public class DocBookParserTest extends A
 
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "bold", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "bold_", ( it.next() ).getName() );
 
-        SinkEventElement el = (SinkEventElement) it.next();
+        SinkEventElement el = it.next();
         assertEquals( "text", el.getName() );
         assertEquals( " ",  (String) el.getArgs()[0] );
 
-        assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "italic", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "italic_", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
 
 
@@ -135,19 +135,19 @@ public class DocBookParserTest extends A
         parser.parse( text, sink );
         it = sink.getEventList().iterator();
 
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "bold", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "bold_", ( it.next() ).getName() );
 
-        el = (SinkEventElement) it.next();
+        el = it.next();
         assertEquals( "text", el.getName() );
         assertEquals( EOL,  (String) el.getArgs()[0] );
 
-        assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "italic", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "italic_", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
     }
 
@@ -160,31 +160,31 @@ public class DocBookParserTest extends A
 
         final SinkEventTestingSink sink = new SinkEventTestingSink();
         parser.parse( text, sink );
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        SinkEventElement event = (SinkEventElement) it.next();
+        SinkEventElement event = it.next();
         assertEquals( "head", event.getName() );
         assertEquals( " id=article", event.getArgs()[0].toString() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
 
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "section1", event.getName() );
         assertEquals( " id=section", event.getArgs()[0].toString() );
 
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "sectionTitle1", event.getName() );
         assertEquals( " id=title", event.getArgs()[0].toString() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1_", ( it.next() ).getName() );
 
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "paragraph", event.getName() );
         assertEquals( " id=para", event.getArgs()[0].toString() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "section1_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
 
         assertFalse( it.hasNext() );
     }
@@ -199,14 +199,14 @@ public class DocBookParserTest extends A
 
         final SinkEventTestingSink sink = new SinkEventTestingSink();
         parser.parse( text, sink );
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "figure", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "figureGraphics", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "figureCaption", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "figureCaption_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "figure_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "figure", ( it.next() ).getName() );
+        assertEquals( "figureGraphics", ( it.next() ).getName() );
+        assertEquals( "figureCaption", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "figureCaption_", ( it.next() ).getName() );
+        assertEquals( "figure_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
 
         sink.reset();
@@ -216,13 +216,13 @@ public class DocBookParserTest extends A
         parser.parse( text, sink );
         it = sink.getEventList().iterator();
 
-        assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "figure", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "figureGraphics", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "figure_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "bold", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "bold_", ( it.next() ).getName() );
+        assertEquals( "figure", ( it.next() ).getName() );
+        assertEquals( "figureGraphics", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "figure_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
     }
 
@@ -236,29 +236,29 @@ public class DocBookParserTest extends A
 
         final SinkEventTestingSink sink = new SinkEventTestingSink();
         parser.parse( text, sink );
-        final Iterator it = sink.getEventList().iterator();
+        final Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "anchor", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "anchor_", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
 
-        SinkEventElement event = (SinkEventElement) it.next();
+        SinkEventElement event = it.next();
         assertEquals( "link", event.getName() );
         assertEquals( "#Anchor", event.getArgs()[0].toString() );
 
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "link_", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
 
-        event = (SinkEventElement) it.next();
+        event = it.next();
         assertEquals( "link", event.getName() );
         assertEquals( "url.com", event.getArgs()[0].toString() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "link_", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
     }
 
@@ -271,19 +271,19 @@ public class DocBookParserTest extends A
 
         final SinkEventTestingSink sink = new SinkEventTestingSink();
         parser.parse( text, sink );
-        final Iterator it = sink.getEventList().iterator();
+        final Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "italic", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "italic_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "monospaced", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "monospaced_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "italic", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "italic_", ( it.next() ).getName() );
+        assertEquals( "bold", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "bold_", ( it.next() ).getName() );
+        assertEquals( "monospaced", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "monospaced_", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
     }
 
@@ -295,13 +295,13 @@ public class DocBookParserTest extends A
 
         final SinkEventTestingSink sink = new SinkEventTestingSink();
         parser.parse( text, sink );
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "list", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "listItem", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "listItem_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "list_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "list", ( it.next() ).getName() );
+        assertEquals( "listItem", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "listItem_", ( it.next() ).getName() );
+        assertEquals( "list_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
 
         text = "<orderedlist numeration=\"upperalpha\"><listitem><para>item</para></listitem></orderedlist>";
@@ -309,13 +309,13 @@ public class DocBookParserTest extends A
         parser.parse( text, sink );
         it = sink.getEventList().iterator();
 
-        SinkEventElement event = (SinkEventElement) it.next();
+        SinkEventElement event = it.next();
         assertEquals( "numberedList", event.getName() );
         assertEquals( Sink.NUMBERING_UPPER_ALPHA, ( (Integer) event.getArgs()[0] ).intValue() );
-        assertEquals( "numberedListItem", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedListItem_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedList_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "numberedListItem", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "numberedListItem_", ( it.next() ).getName() );
+        assertEquals( "numberedList_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
 
         text = "<variablelist><varlistentry><term>term</term><listitem><para>definition</para>"
@@ -324,16 +324,16 @@ public class DocBookParserTest extends A
         parser.parse( text, sink );
         it = sink.getEventList().iterator();
 
-        assertEquals( "definitionList", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definitionListItem", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definedTerm", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definedTerm_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definition", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definition_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definitionListItem_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definitionList_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "definitionList", ( it.next() ).getName() );
+        assertEquals( "definitionListItem", ( it.next() ).getName() );
+        assertEquals( "definedTerm", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "definedTerm_", ( it.next() ).getName() );
+        assertEquals( "definition", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "definition_", ( it.next() ).getName() );
+        assertEquals( "definitionListItem_", ( it.next() ).getName() );
+        assertEquals( "definitionList_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
     }
 
@@ -348,28 +348,28 @@ public class DocBookParserTest extends A
 
         final SinkEventTestingSink sink = new SinkEventTestingSink();
         parser.parse( text, sink );
-        Iterator it = sink.getEventList().iterator();
+        final Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "table", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRows", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableHeaderCell", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableHeaderCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableHeaderCell", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableHeaderCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableCell_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRow_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "tableRows_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "table_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "table", ( it.next() ).getName() );
+        assertEquals( "tableRows", ( it.next() ).getName() );
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        assertEquals( "tableHeaderCell", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "tableHeaderCell_", ( it.next() ).getName() );
+        assertEquals( "tableHeaderCell", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "tableHeaderCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
+        assertEquals( "tableRow", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableCell", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "tableCell_", ( it.next() ).getName() );
+        assertEquals( "tableRow_", ( it.next() ).getName() );
+        assertEquals( "tableRows_", ( it.next() ).getName() );
+        assertEquals( "table_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
     }
 
@@ -384,24 +384,24 @@ public class DocBookParserTest extends A
         final SinkEventTestingSink sink = new SinkEventTestingSink();
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        final Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "title", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "title_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "author", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "author_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "date", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "date_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "title", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "title_", ( it.next() ).getName() );
+        assertEquals( "author", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "author_", ( it.next() ).getName() );
+        assertEquals( "date", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "date_", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
     }
 }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java?rev=1091053&r1=1091052&r2=1091053&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java Mon Apr 11 12:55:07 2011
@@ -45,7 +45,7 @@ public class FmlParserTest
 {
     private FmlParser parser;
 
-    /** {@inheritDoc} */
+    @Override
     protected void setUp()
         throws Exception
     {
@@ -57,8 +57,8 @@ public class FmlParserTest
         // Be sure to delete them
         String tmpDir = System.getProperty( "java.io.tmpdir" );
         String excludes = "fml-*.xsd, xml.xsd";
-        List tmpFiles = FileUtils.getFileNames( new File( tmpDir ), excludes, null, true );
-        for ( Iterator it = tmpFiles.iterator(); it.hasNext(); )
+        List<String> tmpFiles = FileUtils.getFileNames( new File( tmpDir ), excludes, null, true );
+        for ( Iterator<String> it = tmpFiles.iterator(); it.hasNext(); )
         {
             File tmpFile = new File( it.next().toString() );
             tmpFile.delete();
@@ -95,57 +95,57 @@ public class FmlParserTest
             IOUtil.close( reader );
         }
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "comment", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "title", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "title_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedList", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedListItem", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "link", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedListItem_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedList_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definitionList", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definedTerm", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definedTerm_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definition", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "link", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definition_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definitionList_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "comment", ( it.next() ).getName() );
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "title", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "title_", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
+        assertEquals( "section1", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1", ( it.next() ).getName() );
+        assertEquals( "anchor", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "anchor_", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1_", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "bold", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "bold_", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "numberedList", ( it.next() ).getName() );
+        assertEquals( "numberedListItem", ( it.next() ).getName() );
+        assertEquals( "link", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "link_", ( it.next() ).getName() );
+        assertEquals( "numberedListItem_", ( it.next() ).getName() );
+        assertEquals( "numberedList_", ( it.next() ).getName() );
+        assertEquals( "section1_", ( it.next() ).getName() );
+        assertEquals( "section1", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1_", ( it.next() ).getName() );
+        assertEquals( "definitionList", ( it.next() ).getName() );
+        assertEquals( "definedTerm", ( it.next() ).getName() );
+        assertEquals( "anchor", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "anchor_", ( it.next() ).getName() );
+        assertEquals( "definedTerm_", ( it.next() ).getName() );
+        assertEquals( "definition", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "link", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "link_", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "definition_", ( it.next() ).getName() );
+        assertEquals( "definitionList_", ( it.next() ).getName() );
+        assertEquals( "section1_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
         assertFalse( it.hasNext() );
     }
 
@@ -164,87 +164,87 @@ public class FmlParserTest
         parser.setValidate( false );
         parser.parse( text, sink );
 
-        Iterator it = sink.getEventList().iterator();
+        Iterator<SinkEventElement> it = sink.getEventList().iterator();
 
-        assertEquals( "head", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "title", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "head", ( it.next() ).getName() );
+        assertEquals( "title", ( it.next() ).getName() );
 
         // head title TODO: should be two events
-        assertTextEvent( (SinkEventElement) it.next(), "&&#913;" );
+        assertTextEvent( it.next(), "&&#913;" );
 
-        assertEquals( "title_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "head_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "title_", ( it.next() ).getName() );
+        assertEquals( "head_", ( it.next() ).getName() );
+        assertEquals( "body", ( it.next() ).getName() );
+        assertEquals( "section1", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1", ( it.next() ).getName() );
+        assertEquals( "anchor", ( it.next() ).getName() );
 
         // faq title TODO: should be two events
-        assertTextEvent( (SinkEventElement) it.next(), "&&#913;" );
+        assertTextEvent( it.next(), "&&#913;" );
 
-        assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "bold", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "anchor_", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1_", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "bold", ( it.next() ).getName() );
 
         // part title in TOC
-        assertTextEvent( (SinkEventElement) it.next(), "<" );
-        assertTextEvent( (SinkEventElement) it.next(), "\u0391" );
+        assertTextEvent( it.next(), "<" );
+        assertTextEvent( it.next(), "\u0391" );
 
-        assertEquals( "bold_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedList", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedListItem", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "link", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "bold_", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "numberedList", ( it.next() ).getName() );
+        assertEquals( "numberedListItem", ( it.next() ).getName() );
+        assertEquals( "link", ( it.next() ).getName() );
 
         // question in TOC
-        assertTextEvent( (SinkEventElement) it.next(), ">" );
-        assertTextEvent( (SinkEventElement) it.next(), "\u0391" );
+        assertTextEvent( it.next(), ">" );
+        assertTextEvent( it.next(), "\u0391" );
 
-        assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedListItem_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "numberedList_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "sectionTitle1", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "link_", ( it.next() ).getName() );
+        assertEquals( "numberedListItem_", ( it.next() ).getName() );
+        assertEquals( "numberedList_", ( it.next() ).getName() );
+        assertEquals( "section1_", ( it.next() ).getName() );
+        assertEquals( "section1", ( it.next() ).getName() );
+        assertEquals( "sectionTitle1", ( it.next() ).getName() );
 
         // part title
-        assertTextEvent( (SinkEventElement) it.next(), "<" );
-        assertTextEvent( (SinkEventElement) it.next(), "\u0391" );
+        assertTextEvent( it.next(), "<" );
+        assertTextEvent( it.next(), "\u0391" );
 
-        assertEquals( "sectionTitle1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definitionList", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definedTerm", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "anchor", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "sectionTitle1_", ( it.next() ).getName() );
+        assertEquals( "definitionList", ( it.next() ).getName() );
+        assertEquals( "definedTerm", ( it.next() ).getName() );
+        assertEquals( "anchor", ( it.next() ).getName() );
 
         // question
-        assertTextEvent( (SinkEventElement) it.next(), ">" );
-        assertTextEvent( (SinkEventElement) it.next(), "\u0391" );
+        assertTextEvent( it.next(), ">" );
+        assertTextEvent( it.next(), "\u0391" );
 
-        assertEquals( "anchor_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definedTerm_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definition", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "anchor_", ( it.next() ).getName() );
+        assertEquals( "definedTerm_", ( it.next() ).getName() );
+        assertEquals( "definition", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
 
         // answer
-        assertEquals( "monospaced", ( (SinkEventElement) it.next() ).getName() );
-        assertTextEvent( (SinkEventElement) it.next(), "<" );
-        assertTextEvent( (SinkEventElement) it.next(), "img" );
-        assertTextEvent( (SinkEventElement) it.next(), ">" );
-        assertEquals( "monospaced_", ( (SinkEventElement) it.next() ).getName() );
-        assertTextEvent( (SinkEventElement) it.next(), "\"" );
-        assertTextEvent( (SinkEventElement) it.next(), "\u0391" );
-
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "link", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "text", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "link_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "paragraph_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definition_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "definitionList_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "section1_", ( (SinkEventElement) it.next() ).getName() );
-        assertEquals( "body_", ( (SinkEventElement) it.next() ).getName() );
+        assertEquals( "monospaced", ( it.next() ).getName() );
+        assertTextEvent( it.next(), "<" );
+        assertTextEvent( it.next(), "img" );
+        assertTextEvent( it.next(), ">" );
+        assertEquals( "monospaced_", ( it.next() ).getName() );
+        assertTextEvent( it.next(), "\"" );
+        assertTextEvent( it.next(), "\u0391" );
+
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "paragraph", ( it.next() ).getName() );
+        assertEquals( "link", ( it.next() ).getName() );
+        assertEquals( "text", ( it.next() ).getName() );
+        assertEquals( "link_", ( it.next() ).getName() );
+        assertEquals( "paragraph_", ( it.next() ).getName() );
+        assertEquals( "definition_", ( it.next() ).getName() );
+        assertEquals( "definitionList_", ( it.next() ).getName() );
+        assertEquals( "section1_", ( it.next() ).getName() );
+        assertEquals( "body_", ( it.next() ).getName() );
 
         assertFalse( it.hasNext() );
     }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java?rev=1091053&r1=1091052&r2=1091053&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java Mon Apr 11 12:55:07 2011
@@ -41,20 +41,6 @@ public class FmlValidatorTest
     private static final File FML_XSD = new File( getBasedir(), "/src/main/resources/fml-1.0.1.xsd" );
 
     /** {@inheritDoc} */
-    protected void setUp()
-        throws Exception
-    {
-        super.setUp();
-    }
-
-    /** {@inheritDoc} */
-    protected void tearDown()
-        throws Exception
-    {
-        super.tearDown();
-    }
-
-    /** {@inheritDoc} */
     protected String[] getIncludes()
     {
         return new String[] { "**/*.fml" };

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=1091053&r1=1091052&r2=1091053&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 Mon Apr 11 12:55:07 2011
@@ -908,7 +908,7 @@ public class FoAggregateSink
             writeStartTag( TABLE_CELL_TAG, "toc.cell" );
             writeStartTag( BLOCK_TAG, "toc.number.style" );
 
-            NumberedListItem current = (NumberedListItem) tocStack.peek();
+            NumberedListItem current = tocStack.peek();
             current.next();
             write( currentTocNumber() );
 
@@ -948,11 +948,11 @@ public class FoAggregateSink
 
     private String currentTocNumber()
     {
-        String ch = ( (NumberedListItem) tocStack.get( 0 ) ).getListItemSymbol();
+        String ch = ( tocStack.get( 0 ) ).getListItemSymbol();
 
         for ( int i = 1; i < tocStack.size(); i++ )
         {
-            ch = ch + "." + ( (NumberedListItem) tocStack.get( i ) ).getListItemSymbol();
+            ch = ch + "." + tocStack.get( i ).getListItemSymbol();
         }
 
         return ch;

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=1091053&r1=1091052&r2=1091053&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 Mon Apr 11 12:55:07 2011
@@ -158,7 +158,7 @@ public class FoConfiguration
 
         Object prop = config.getProperty( keybase + ".xsl:attribute" );
 
-        if ( prop instanceof List )
+        if ( prop instanceof List<?> )
         {
             List<?> values = (List<?>) prop;
             List<?> keys = config.getList( keybase + ".xsl:attribute[@name]" );

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=1091053&r1=1091052&r2=1091053&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 Mon Apr 11 12:55:07 2011
@@ -634,7 +634,7 @@ public class FoSink
     /** {@inheritDoc} */
     public void numberedListItem( SinkEventAttributes attributes )
     {
-        NumberedListItem current = (NumberedListItem) this.listStack.peek();
+        NumberedListItem current = this.listStack.peek();
         current.next();
 
         writeStartTag( LIST_ITEM_TAG, "list.item" );
@@ -1083,7 +1083,7 @@ public class FoSink
             justif = attributes.getAttribute( Attribute.ALIGN.toString() ).toString();
         }
 
-        int[] cellJustif = (int[]) this.cellJustifStack.getLast();
+        int[] cellJustif = this.cellJustifStack.getLast();
         if ( justif == null && cellJustif != null && cellJustif.length > 0
             && this.isCellJustifStack.getLast().equals( Boolean.TRUE ) )
         {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java?rev=1091053&r1=1091052&r2=1091053&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java Mon Apr 11 12:55:07 2011
@@ -37,11 +37,7 @@ public class FoAggregateSinkTest
 
     private Writer writer;
 
-    /**
-     * Set up the writer.
-     *
-     * @throws java.lang.Exception if any.
-     */
+    @Override
     protected void setUp()
         throws Exception
     {

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=1091053&r1=1091052&r2=1091053&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 Mon Apr 11 12:55:07 2011
@@ -132,7 +132,7 @@ public class SinkActionContext
         }
         else
         {
-            return ( (Integer) stack.peek() ).intValue();
+            return stack.peek().intValue();
         }
     }
 



Mime
View raw message