jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1690133 - /jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
Date Thu, 09 Jul 2015 18:05:44 GMT
Author: juanpablo
Date: Thu Jul  9 18:05:43 2015
New Revision: 1690133

URL: http://svn.apache.org/r1690133
Log:
getting rid of some unparametrized collection warnings

Modified:
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java?rev=1690133&r1=1690132&r2=1690133&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
Thu Jul  9 18:05:43 2015
@@ -446,11 +446,11 @@ public class JSPWikiMarkupParser extends
      */
     protected void callHeadingListenerChain( Heading param )
     {
-        List list = m_headingListenerChain;
+        List< HeadingListener > list = m_headingListenerChain;
 
-        for( Iterator i = list.iterator(); i.hasNext(); )
+        for( Iterator< HeadingListener > i = list.iterator(); i.hasNext(); )
         {
-            HeadingListener h = (HeadingListener) i.next();
+            HeadingListener h = i.next();
 
             h.headingAdded( m_context, param );
         }
@@ -679,9 +679,9 @@ public class JSPWikiMarkupParser extends
         {
             link = link.toLowerCase();
 
-            for( Iterator i = m_inlineImagePatterns.iterator(); i.hasNext(); )
+            for( Iterator< Pattern >  i = m_inlineImagePatterns.iterator(); i.hasNext();
)
             {
-                if( m_inlineMatcher.matches( link, (Pattern) i.next() ) )
+                if( m_inlineMatcher.matches( link, i.next() ) )
                     return true;
             }
         }
@@ -2925,7 +2925,7 @@ public class JSPWikiMarkupParser extends
         //
         //  Add the paragraph tag to the first paragraph
         //
-        List kids = rootElement.getContent();
+        List< Content > kids = rootElement.getContent();
 
         if( rootElement.getChild("p") != null )
         {
@@ -2933,13 +2933,13 @@ public class JSPWikiMarkupParser extends
             int idxOfFirstContent = 0;
             int count = 0;
 
-            for( Iterator i = kids.iterator(); i.hasNext(); count++ )
+            for( Iterator< Content > i = kids.iterator(); i.hasNext(); count++ )
             {
-                Content c = (Content) i.next();
+                Content c = i.next();
                 if( c instanceof Element )
                 {
-                    String name = ((Element)c).getName();
-                    if( isBlockLevel(name) ) break;
+                    String name = ( ( Element )c ).getName();
+                    if( isBlockLevel( name ) ) break;
                 }
 
                 if( !(c instanceof ProcessingInstruction) )
@@ -2957,9 +2957,9 @@ public class JSPWikiMarkupParser extends
             {
                 Element newel = new Element("p");
 
-                for( Iterator i = ls.iterator(); i.hasNext(); )
+                for( Iterator< Content > i = ls.iterator(); i.hasNext(); )
                 {
-                    Content c = (Content) i.next();
+                    Content c = i.next();
 
                     c.detach();
                     newel.addContent(c);



Mime
View raw message