jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r782493 - in /incubator/jspwiki/trunk/src/java/org/apache/wiki: action/ auth/ auth/authorize/ auth/user/ tags/ ui/ ui/admin/beans/ url/ workflow/ xmlrpc/
Date Mon, 08 Jun 2009 01:35:02 GMT
Author: ajaquith
Date: Mon Jun  8 01:35:01 2009
New Revision: 782493

URL: http://svn.apache.org/viewvc?rev=782493&view=rev
Log:
Cleanup of a few stray unneeded annotations and imports, and Java-fived a few other classes
and JSPs.

Modified:
    incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractPageActionBean.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/UserManager.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/XMLGroupDatabase.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/AbstractUserDatabase.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/DefaultUserProfile.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/IteratorTag.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PluginTag.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiBodyTag.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/WikiServletFilter.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/admin/beans/SearchManagerBean.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/url/StripesURLConstructor.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/AbstractStep.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Decision.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Task.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCServlet.java

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractPageActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractPageActionBean.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractPageActionBean.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/action/AbstractPageActionBean.java Mon
Jun  8 01:35:01 2009
@@ -21,13 +21,9 @@
 
 package org.apache.wiki.action;
 
-import javax.servlet.http.HttpSession;
-
 import net.sourceforge.stripes.validation.Validate;
 
 import org.apache.wiki.api.WikiPage;
-import org.apache.wiki.tags.BreadcrumbsTag;
-import org.apache.wiki.tags.BreadcrumbsTag.FixedQueue;
 
 /**
  * Abstract {@link WikiActionBean} subclass used by all ActionBeans that use and

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java Mon Jun
 8 01:35:01 2009
@@ -70,7 +70,6 @@
  */
 public final class WikiContextFactory
 {
-    @SuppressWarnings("unused")
     private static final String ATTR_CONTEXT = "wikiContext";
 
     /**

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/UserManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/UserManager.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/UserManager.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/UserManager.java Mon Jun  8 01:35:01
2009
@@ -476,7 +476,6 @@
      * @param context the current wiki context
      * @param profile the supplied UserProfile
      */
-    @SuppressWarnings("unchecked")
     public final void validateProfile( WikiContext context, UserProfile profile )
     {
         boolean isNew = profile.isNew();
@@ -592,7 +591,6 @@
          * No-op.
          * @throws WikiSecurityException never...
          */
-        @SuppressWarnings("deprecation")
         public void commit() throws WikiSecurityException
         {
             // No operation

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
(original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
Mon Jun  8 01:35:01 2009
@@ -244,7 +244,6 @@
      * @deprecated there is no need to call this method because the save and
      *             delete methods contain their own commit logic
      */
-    @SuppressWarnings("deprecation")
     public void commit() throws WikiSecurityException
     {
     }

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/XMLGroupDatabase.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/XMLGroupDatabase.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/XMLGroupDatabase.java
(original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/authorize/XMLGroupDatabase.java
Mon Jun  8 01:35:01 2009
@@ -125,7 +125,6 @@
      * @deprecated there is no need to call this method because the save and
      * delete methods contain their own commit logic
      */
-    @SuppressWarnings("deprecation")
     public void commit() throws WikiSecurityException
     { }
 

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/AbstractUserDatabase.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/AbstractUserDatabase.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/AbstractUserDatabase.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/AbstractUserDatabase.java Mon
Jun  8 01:35:01 2009
@@ -59,7 +59,6 @@
      * @deprecated there is no need to call this method because the save, rename and
      * delete methods contain their own commit logic
      */
-    @SuppressWarnings("deprecation")
     public synchronized void commit() throws WikiSecurityException
     { }
 

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/DefaultUserProfile.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/DefaultUserProfile.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/DefaultUserProfile.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/user/DefaultUserProfile.java Mon
Jun  8 01:35:01 2009
@@ -264,7 +264,6 @@
      * @param name the wiki name
      * @deprecated This method will be removed in a future release.
      */
-    @SuppressWarnings("deprecation")
     public void setWikiName( String name )
     {
     }

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/IteratorTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/IteratorTag.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/IteratorTag.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/IteratorTag.java Mon Jun  8 01:35:01
2009
@@ -51,6 +51,8 @@
  */
 public abstract class IteratorTag<T> extends BodyTagSupport implements TryCatchFinally
 {
+    private static final long serialVersionUID = 7401852034172736286L;
+
     private static Logger log = LoggerFactory.getLogger( IteratorTag.class );
 
     private Collection<T> m_items = null;

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PluginTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PluginTag.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PluginTag.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PluginTag.java Mon Jun  8 01:35:01
2009
@@ -93,7 +93,6 @@
         return EVAL_BODY_BUFFERED;
     }
 
-    @SuppressWarnings("unchecked")
     private String executePlugin( String plugin, String args, String body )
         throws PluginException, IOException
     {

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiBodyTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiBodyTag.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiBodyTag.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/WikiBodyTag.java Mon Jun  8 01:35:01
2009
@@ -42,6 +42,8 @@
 public abstract class WikiBodyTag extends BodyTagSupport
     implements TryCatchFinally
 {
+    private static final long serialVersionUID = 8229258658211707992L;
+
     protected WikiContext m_wikiContext;
     static    Logger    log = LoggerFactory.getLogger( WikiBodyTag.class );
 

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/WikiServletFilter.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/WikiServletFilter.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/WikiServletFilter.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/WikiServletFilter.java Mon Jun  8
01:35:01 2009
@@ -28,7 +28,6 @@
 import javax.servlet.http.HttpServletRequestWrapper;
 
 
-import org.apache.wiki.WikiContext;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.WikiSession;
 import org.apache.wiki.auth.AuthenticationManager;
@@ -37,7 +36,6 @@
 import org.apache.wiki.log.Logger;
 import org.apache.wiki.log.LoggerFactory;
 import org.apache.wiki.preferences.Preferences;
-import org.apache.wiki.tags.WikiTagBase;
 import org.slf4j.MDC;
 
 

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/admin/beans/SearchManagerBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/admin/beans/SearchManagerBean.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/admin/beans/SearchManagerBean.java
(original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/admin/beans/SearchManagerBean.java
Mon Jun  8 01:35:01 2009
@@ -92,7 +92,6 @@
                     setName("Reindexer started");
                 }
 
-                @SuppressWarnings("unchecked")
                 public void backgroundTask() throws Exception
                 {
                     Collection<WikiPage> allPages = m_engine.getContentManager().getAllPages(
null );

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/url/StripesURLConstructor.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/url/StripesURLConstructor.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/url/StripesURLConstructor.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/url/StripesURLConstructor.java Mon Jun
 8 01:35:01 2009
@@ -183,7 +183,6 @@
     /**
      * {@inheritDoc}
      */
-    @SuppressWarnings("unchecked")
     public void initialize( WikiEngine engine, Properties properties )
     {
         super.initialize( engine, properties );

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/AbstractStep.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/AbstractStep.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/AbstractStep.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/AbstractStep.java Mon Jun  8
01:35:01 2009
@@ -37,6 +37,7 @@
  */
 public abstract class AbstractStep implements Step
 {
+    private static final long serialVersionUID = 6095697006504453318L;
 
     /** Timestamp of when the step started. */
     private Date m_start;

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Decision.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Decision.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Decision.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Decision.java Mon Jun  8 01:35:01
2009
@@ -58,6 +58,8 @@
  */
 public abstract class Decision extends AbstractStep
 {
+    private static final long serialVersionUID = -6835601038263238062L;
+
     private Principal m_actor;
 
     private int m_id;

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Task.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Task.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Task.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/workflow/Task.java Mon Jun  8 01:35:01
2009
@@ -38,6 +38,8 @@
  */
 public abstract class Task extends AbstractStep
 {
+    private static final long serialVersionUID = 4630293957752430807L;
+
     private Step m_successor = null;
 
     /**

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java Mon Jun
 8 01:35:01 2009
@@ -130,7 +130,7 @@
      *  @throws XmlRpcException If something goes wrong
      *  @return An empty hashtable.
      */
-    public Hashtable getCategories( String blogid,
+    public Hashtable<String,? extends Object> getCategories( String blogid,
                                     String username,
                                     String password )
         throws XmlRpcException
@@ -142,7 +142,7 @@
 
             checkPermissions( page, username, password, "view" );
 
-            Hashtable ht = new Hashtable();
+            Hashtable<String,Object> ht = new Hashtable<String,Object>();
 
             return ht;
         }
@@ -170,7 +170,7 @@
      *  @param page The actual entry page
      *  @return A metaWeblog entry struct.
      */
-    private Hashtable<String,Object> makeEntry( WikiPage page ) throws XmlRpcException
+    private Hashtable<String,? extends Object> makeEntry( WikiPage page ) throws XmlRpcException
     {
         Hashtable<String, Object> ht = new Hashtable<String, Object>();
 
@@ -228,13 +228,13 @@
     //        goes through all of the blog entries.
 
     @SuppressWarnings("unchecked")
-    public Hashtable getRecentPosts( String blogid,
+    public Hashtable<String, ? extends Object> getRecentPosts( String blogid,
                                      String username,
                                      String password,
                                      int numberOfPosts)
         throws XmlRpcException
     {
-        Hashtable<String, Hashtable<String, Object>> result = new Hashtable<String,
Hashtable<String, Object>>();
+        Hashtable<String, Hashtable<String,? extends Object>> result = new Hashtable<String,
Hashtable<String,? extends Object>>();
 
         log.info( "metaWeblog.getRecentPosts() called");
 
@@ -288,7 +288,7 @@
     public String newPost( String blogid,
                            String username,
                            String password,
-                           Hashtable content,
+                           Hashtable<String,? extends Object> content,
                            boolean publish )
         throws XmlRpcException
     {
@@ -344,10 +344,10 @@
      *  @throws XmlRpcException If something goes wrong
      *  
      */
-    public Hashtable newMediaObject( String blogid, 
+    public Hashtable<String,? extends Object> newMediaObject( String blogid, 
                                      String username,
                                      String password,
-                                     Hashtable content )
+                                     Hashtable<String,? extends Object> content )
         throws XmlRpcException
     {
         WikiEngine engine = m_context.getEngine();
@@ -399,7 +399,7 @@
     boolean editPost( String postid,
                       String username,
                       String password,
-                      Hashtable content,
+                      Hashtable<String,? extends Object> content,
                       boolean publish )
         throws XmlRpcException
     {
@@ -443,7 +443,7 @@
      *  Gets the text of any page.  The title of the page is parsed
      *  (if any is provided).
      */
-    Hashtable getPost( String postid,
+    Hashtable<String,? extends Object> getPost( String postid,
                        String username,
                        String password )
         throws XmlRpcException

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java Mon Jun  8 01:35:01
2009
@@ -26,7 +26,6 @@
 
 import org.apache.wiki.*;
 import org.apache.wiki.api.WikiPage;
-import org.apache.wiki.attachment.Attachment;
 import org.apache.wiki.auth.permissions.PagePermission;
 import org.apache.wiki.auth.permissions.PermissionFactory;
 import org.apache.wiki.content.PageNotFoundException;

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java Mon Jun  8
01:35:01 2009
@@ -26,7 +26,6 @@
 import org.apache.wiki.WikiContext;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.api.WikiPage;
-import org.apache.wiki.attachment.Attachment;
 import org.apache.wiki.auth.permissions.PagePermission;
 import org.apache.wiki.auth.permissions.PermissionFactory;
 import org.apache.wiki.content.PageNotFoundException;

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCServlet.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCServlet.java?rev=782493&r1=782492&r2=782493&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCServlet.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCServlet.java Mon Jun  8 01:35:01
2009
@@ -78,7 +78,7 @@
         rpchandler.initialize( m_engine );
         m_xmlrpcServer.addHandler( prefix, rpchandler );
         */
-        Class handlerClass = Class.forName( handlerName );
+        Class<? extends WikiRPCHandler> handlerClass = Class.forName( handlerName ).asSubclass(
WikiRPCHandler.class );
         m_xmlrpcServer.addHandler( prefix, new LocalHandler(handlerClass) );
     }
 
@@ -190,16 +190,17 @@
     private static class LocalHandler
         implements ContextXmlRpcHandler
     {
-        private Class m_clazz;
+        private Class<? extends WikiRPCHandler> m_clazz;
 
-        public LocalHandler( Class clazz )
+        public LocalHandler( Class<? extends WikiRPCHandler> clazz )
         {
             m_clazz = clazz;
         }
 
+        @SuppressWarnings("unchecked")
         public Object execute(String method, Vector params, XmlRpcContext context) throws
Exception
         {
-            WikiRPCHandler rpchandler = (WikiRPCHandler) m_clazz.newInstance();
+            WikiRPCHandler rpchandler = m_clazz.newInstance();
             rpchandler.initialize( ((WikiXmlRpcContext)context).getWikiContext() );
 
             Invoker invoker = new Invoker( rpchandler );



Mime
View raw message