jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r666979 - in /incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans: PluginBean.java SearchManagerBean.java
Date Thu, 12 Jun 2008 06:30:53 GMT
Author: ajaquith
Date: Wed Jun 11 23:30:52 2008
New Revision: 666979

URL: http://svn.apache.org/viewvc?rev=666979&view=rev
Log:
Miscellaneous and varied Java 5 enhancements (such as for-loops), or comments.

Modified:
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/PluginBean.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/SearchManagerBean.java

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/PluginBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/PluginBean.java?rev=666979&r1=666978&r2=666979&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/PluginBean.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/PluginBean.java Wed Jun 11
23:30:52 2008
@@ -62,9 +62,10 @@
         return CORE;
     }
 
+    @SuppressWarnings("unchecked")
     public String doGet(WikiContext context)
     {
-        Collection plugins = m_engine.getPluginManager().modules();
+        Collection<WikiPluginInfo> plugins = m_engine.getPluginManager().modules();
 
         div root = new div();
 
@@ -81,12 +82,12 @@
 
         tb.addElement(head);
 
-        for( Iterator i = plugins.iterator(); i.hasNext(); )
+        for( Iterator<WikiPluginInfo> i = plugins.iterator(); i.hasNext(); )
         {
             tr  row = new tr();
             tb.addElement( row );
 
-            WikiPluginInfo info = (WikiPluginInfo)i.next();
+            WikiPluginInfo info = i.next();
 
             row.addElement( new td(info.getName()) );
             row.addElement( new td(info.getAlias()) );

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/SearchManagerBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/SearchManagerBean.java?rev=666979&r1=666978&r2=666979&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/SearchManagerBean.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/admin/beans/SearchManagerBean.java Wed
Jun 11 23:30:52 2008
@@ -21,7 +21,6 @@
 package com.ecyrd.jspwiki.ui.admin.beans;
 
 import java.util.Collection;
-import java.util.Iterator;
 
 import javax.management.NotCompliantMBeanException;
 
@@ -92,9 +91,10 @@
                     setName("Reindexer started");
                 }
 
+                @SuppressWarnings("unchecked")
                 public void backgroundTask() throws Exception
                 {
-                    Collection allPages = m_engine.getPageManager().getAllPages();
+                    Collection<WikiPage> allPages = m_engine.getPageManager().getAllPages();
 
                     SearchManager mgr = m_engine.getSearchManager();
                     m_max = allPages.size();
@@ -108,10 +108,8 @@
 
                     m_engine.getProgressManager().startProgress( pi, PROGRESS_ID );
 
-                    for( Iterator i = allPages.iterator(); i.hasNext(); )
+                    for( WikiPage page : allPages )
                     {
-                        WikiPage page = (WikiPage) i.next();
-
                         mgr.reindexPage(page);
                         m_count++;
                     }



Mime
View raw message