You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by tv...@apache.org on 2011/03/06 20:58:49 UTC

svn commit: r1078552 [2/3] - in /turbine/core/trunk/src: java/org/apache/turbine/modules/ java/org/apache/turbine/modules/actions/sessionvalidator/ java/org/apache/turbine/modules/navigations/ java/org/apache/turbine/modules/pages/ java/org/apache/turb...

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaNavigationFactory.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaNavigationFactory.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaNavigationFactory.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaNavigationFactory.java Sun Mar  6 19:58:46 2011
@@ -21,7 +21,6 @@ package org.apache.turbine.services.asse
  */
 
 
-import org.apache.turbine.modules.Assembler;
 import org.apache.turbine.modules.Loader;
 import org.apache.turbine.modules.Navigation;
 import org.apache.turbine.modules.NavigationLoader;
@@ -35,7 +34,7 @@ import org.apache.turbine.modules.Naviga
  * @version $Id$
  */
 public class JavaNavigationFactory
-        extends JavaBaseFactory
+        extends JavaBaseFactory<Navigation>
 {
     /**
      * Get an Assembler.
@@ -43,17 +42,18 @@ public class JavaNavigationFactory
      * @param name name of the requested Assembler
      * @return an Assembler
      */
-    public Assembler getAssembler(String name)
+    public Navigation getAssembler(String name)
     {
         return getAssembler(Navigation.PREFIX, name);
     }
 
     /**
      * Get the loader for this type of assembler
-     * 
+     *
      * @return a Loader
      */
-    public Loader getLoader()
+    @Override
+    public Loader<Navigation> getLoader()
     {
         return NavigationLoader.getInstance();
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaPageFactory.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaPageFactory.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaPageFactory.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaPageFactory.java Sun Mar  6 19:58:46 2011
@@ -21,7 +21,6 @@ package org.apache.turbine.services.asse
  */
 
 
-import org.apache.turbine.modules.Assembler;
 import org.apache.turbine.modules.Loader;
 import org.apache.turbine.modules.Page;
 import org.apache.turbine.modules.PageLoader;
@@ -35,7 +34,7 @@ import org.apache.turbine.modules.PageLo
  * @version $Id$
  */
 public class JavaPageFactory
-        extends JavaBaseFactory
+        extends JavaBaseFactory<Page>
 {
     /**
      * Get an Assembler.
@@ -43,17 +42,18 @@ public class JavaPageFactory
      * @param name name of the requested Assembler
      * @return an Assembler
      */
-    public Assembler getAssembler(String name)
+    public Page getAssembler(String name)
     {
         return getAssembler(Page.PREFIX, name);
     }
 
     /**
      * Get the loader for this type of assembler
-     * 
+     *
      * @return a Loader
      */
-    public Loader getLoader()
+    @Override
+    public Loader<Page> getLoader()
     {
         return PageLoader.getInstance();
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaScheduledJobFactory.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaScheduledJobFactory.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaScheduledJobFactory.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaScheduledJobFactory.java Sun Mar  6 19:58:46 2011
@@ -21,7 +21,6 @@ package org.apache.turbine.services.asse
  */
 
 
-import org.apache.turbine.modules.Assembler;
 import org.apache.turbine.modules.Loader;
 import org.apache.turbine.modules.ScheduledJob;
 import org.apache.turbine.modules.ScheduledJobLoader;
@@ -35,7 +34,7 @@ import org.apache.turbine.modules.Schedu
  * @version $Id$
  */
 public class JavaScheduledJobFactory
-        extends JavaBaseFactory
+        extends JavaBaseFactory<ScheduledJob>
 {
     /**
      * Get an Assembler.
@@ -43,17 +42,18 @@ public class JavaScheduledJobFactory
      * @param name name of the requested Assembler
      * @return an Assembler
      */
-    public Assembler getAssembler(String name)
+    public ScheduledJob getAssembler(String name)
     {
         return getAssembler(ScheduledJob.PREFIX, name);
     }
 
     /**
      * Get the loader for this type of assembler
-     * 
+     *
      * @return a Loader
      */
-    public Loader getLoader()
+    @Override
+    public Loader<ScheduledJob> getLoader()
     {
         return ScheduledJobLoader.getInstance();
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaScreenFactory.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaScreenFactory.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaScreenFactory.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/java/JavaScreenFactory.java Sun Mar  6 19:58:46 2011
@@ -21,7 +21,6 @@ package org.apache.turbine.services.asse
  */
 
 
-import org.apache.turbine.modules.Assembler;
 import org.apache.turbine.modules.Loader;
 import org.apache.turbine.modules.Screen;
 import org.apache.turbine.modules.ScreenLoader;
@@ -35,7 +34,7 @@ import org.apache.turbine.modules.Screen
  * @version $Id$
  */
 public class JavaScreenFactory
-        extends JavaBaseFactory
+        extends JavaBaseFactory<Screen>
 {
     /**
      * Get an Assembler.
@@ -43,17 +42,18 @@ public class JavaScreenFactory
      * @param name name of the requested Assembler
      * @return an Assembler
      */
-    public Assembler getAssembler(String name)
+    public Screen getAssembler(String name)
     {
         return getAssembler(Screen.PREFIX, name);
     }
 
     /**
      * Get the loader for this type of assembler
-     * 
+     *
      * @return a Loader
      */
-    public Loader getLoader()
+    @Override
+    public Loader<Screen> getLoader()
     {
         return ScreenLoader.getInstance();
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonBaseFactory.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonBaseFactory.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonBaseFactory.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonBaseFactory.java Sun Mar  6 19:58:46 2011
@@ -24,17 +24,13 @@ package org.apache.turbine.services.asse
 import java.io.File;
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.commons.lang.StringUtils;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.turbine.modules.Assembler;
 import org.apache.turbine.modules.Loader;
 import org.apache.turbine.services.assemblerbroker.TurbineAssemblerBroker;
 import org.apache.turbine.services.assemblerbroker.util.AssemblerFactory;
-
 import org.python.core.Py;
 import org.python.util.PythonInterpreter;
 
@@ -48,8 +44,8 @@ import org.python.util.PythonInterpreter
  * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version $Id$
  */
-public abstract class PythonBaseFactory
-        implements AssemblerFactory
+public abstract class PythonBaseFactory<T extends Assembler>
+        implements AssemblerFactory<T>
 {
     /** Key for the python path */
     public static final String PYTHON_PATH = "python.path";
@@ -61,7 +57,7 @@ public abstract class PythonBaseFactory
     private static Log log = LogFactory.getLog(PythonBaseFactory.class);
 
     /** Our configuration */
-    private Configuration conf =
+    private final Configuration conf =
         TurbineAssemblerBroker.getService().getConfiguration();
 
     /**
@@ -72,7 +68,7 @@ public abstract class PythonBaseFactory
      * @return an Assembler
      * @throws Exception generic exception
      */
-    public Assembler getAssembler(String subDirectory, String name)
+    public T getAssembler(String subDirectory, String name)
             throws Exception
     {
         String path = conf.getString(PYTHON_PATH);
@@ -85,7 +81,7 @@ public abstract class PythonBaseFactory
 
         log.debug("Screen name for JPython: " + name);
 
-        Assembler assembler = null;
+        T assembler = null;
 
         String confName = path + "/" + PYTHON_CONFIG_FILE;
 
@@ -146,13 +142,13 @@ public abstract class PythonBaseFactory
                 }
 
                 // Here we convert the python sceen instance to a java instance.
-                assembler = (Assembler) interp.get("scr", Assembler.class);
+                assembler = (T) interp.get("scr", Assembler.class);
             }
             catch (Exception e)
             {
                 // We log the error here because this code is not widely tested
                 // yet. After we tested the code on a range of platforms this
-                // won't be usefull anymore.
+                // won't be useful anymore.
                 log.error("PYTHON SCRIPT SCREEN LOADER ERROR:", e);
                 throw e;
             }
@@ -162,18 +158,18 @@ public abstract class PythonBaseFactory
 
     /**
      * Get the loader for this type of assembler
-     * 
+     *
      * @return a Loader
      */
-    public abstract Loader getLoader();
-    
+    public abstract Loader<T> getLoader();
+
     /**
      * Get the size of a possibly configured cache
-     * 
+     *
      * @return the size of the cache in bytes
      */
     public int getCacheSize()
-    
+
     {
         return getLoader().getCacheSize();
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonLayoutFactory.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonLayoutFactory.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonLayoutFactory.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonLayoutFactory.java Sun Mar  6 19:58:46 2011
@@ -21,7 +21,6 @@ package org.apache.turbine.services.asse
  */
 
 
-import org.apache.turbine.modules.Assembler;
 import org.apache.turbine.modules.Layout;
 import org.apache.turbine.modules.LayoutLoader;
 import org.apache.turbine.modules.Loader;
@@ -37,7 +36,7 @@ import org.apache.turbine.modules.Loader
  * @version $Id$
  */
 public class PythonLayoutFactory
-        extends PythonBaseFactory
+        extends PythonBaseFactory<Layout>
 {
     /**
      * Get an Assembler.
@@ -46,7 +45,7 @@ public class PythonLayoutFactory
      * @return an Assembler
      * @throws Exception generic exception
      */
-    public Assembler getAssembler(String name)
+    public Layout getAssembler(String name)
         throws Exception
     {
         return getAssembler(Layout.PREFIX, name);
@@ -54,10 +53,11 @@ public class PythonLayoutFactory
 
     /**
      * Get the loader for this type of assembler
-     * 
+     *
      * @return a Loader
      */
-    public Loader getLoader()
+    @Override
+    public Loader<Layout> getLoader()
     {
         return LayoutLoader.getInstance();
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonNavigationFactory.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonNavigationFactory.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonNavigationFactory.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonNavigationFactory.java Sun Mar  6 19:58:46 2011
@@ -21,7 +21,6 @@ package org.apache.turbine.services.asse
  */
 
 
-import org.apache.turbine.modules.Assembler;
 import org.apache.turbine.modules.Loader;
 import org.apache.turbine.modules.Navigation;
 import org.apache.turbine.modules.NavigationLoader;
@@ -37,7 +36,7 @@ import org.apache.turbine.modules.Naviga
  * @version $Id$
  */
 public class PythonNavigationFactory
-        extends PythonBaseFactory
+        extends PythonBaseFactory<Navigation>
 {
     /**
      * Get an Assembler.
@@ -46,7 +45,7 @@ public class PythonNavigationFactory
      * @return an Assembler
      * @throws Exception generic exception
      */
-    public Assembler getAssembler(String name)
+    public Navigation getAssembler(String name)
         throws Exception
     {
         return getAssembler(Navigation.PREFIX, name);
@@ -54,10 +53,11 @@ public class PythonNavigationFactory
 
     /**
      * Get the loader for this type of assembler
-     * 
+     *
      * @return a Loader
      */
-    public Loader getLoader()
+    @Override
+    public Loader<Navigation> getLoader()
     {
         return NavigationLoader.getInstance();
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonPageFactory.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonPageFactory.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonPageFactory.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonPageFactory.java Sun Mar  6 19:58:46 2011
@@ -21,7 +21,6 @@ package org.apache.turbine.services.asse
  */
 
 
-import org.apache.turbine.modules.Assembler;
 import org.apache.turbine.modules.Loader;
 import org.apache.turbine.modules.Page;
 import org.apache.turbine.modules.PageLoader;
@@ -37,7 +36,7 @@ import org.apache.turbine.modules.PageLo
  * @version $Id$
  */
 public class PythonPageFactory
-        extends PythonBaseFactory
+        extends PythonBaseFactory<Page>
 {
     /**
      * Get an Assembler.
@@ -46,7 +45,7 @@ public class PythonPageFactory
      * @return an Assembler
      * @throws Exception generic exception
      */
-    public Assembler getAssembler(String name)
+    public Page getAssembler(String name)
         throws Exception
     {
         return getAssembler(Page.PREFIX, name);
@@ -54,10 +53,11 @@ public class PythonPageFactory
 
     /**
      * Get the loader for this type of assembler
-     * 
+     *
      * @return a Loader
      */
-    public Loader getLoader()
+    @Override
+    public Loader<Page> getLoader()
     {
         return PageLoader.getInstance();
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonScreenFactory.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonScreenFactory.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonScreenFactory.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/assemblerbroker/util/python/PythonScreenFactory.java Sun Mar  6 19:58:46 2011
@@ -21,7 +21,6 @@ package org.apache.turbine.services.asse
  */
 
 
-import org.apache.turbine.modules.Assembler;
 import org.apache.turbine.modules.Loader;
 import org.apache.turbine.modules.Screen;
 import org.apache.turbine.modules.ScreenLoader;
@@ -37,7 +36,7 @@ import org.apache.turbine.modules.Screen
  * @version $Id$
  */
 public class PythonScreenFactory
-        extends PythonBaseFactory
+        extends PythonBaseFactory<Screen>
 {
     /**
      * Get an Assembler.
@@ -46,7 +45,7 @@ public class PythonScreenFactory
      * @return an Assembler
      * @throws Exception generic exception
      */
-    public Assembler getAssembler(String name)
+    public Screen getAssembler(String name)
         throws Exception
     {
         return getAssembler(Screen.PREFIX, name);
@@ -54,10 +53,11 @@ public class PythonScreenFactory
 
     /**
      * Get the loader for this type of assembler
-     * 
+     *
      * @return a Loader
      */
-    public Loader getLoader()
+    @Override
+    public Loader<Screen> getLoader()
     {
         return ScreenLoader.getInstance();
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/intake/IntakeTool.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/intake/IntakeTool.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/intake/IntakeTool.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/intake/IntakeTool.java Sun Mar  6 19:58:46 2011
@@ -28,15 +28,14 @@ import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.fulcrum.intake.IntakeServiceFacade;
 import org.apache.fulcrum.intake.IntakeException;
+import org.apache.fulcrum.intake.IntakeServiceFacade;
 import org.apache.fulcrum.intake.Retrievable;
 import org.apache.fulcrum.intake.model.Group;
+import org.apache.fulcrum.parser.ValueParser;
 import org.apache.fulcrum.pool.Recyclable;
-
 import org.apache.turbine.services.pull.ApplicationTool;
 import org.apache.turbine.util.RunData;
-import org.apache.fulcrum.parser.ValueParser;
 
 
 /**
@@ -62,21 +61,22 @@ public class IntakeTool
     public static final String INTAKE_GRP = "intake-grp";
 
     /** Groups from intake.xml */
-    protected HashMap groups;
+    protected HashMap<String, Group> groups;
 
     /** ValueParser instance */
     protected ValueParser pp;
 
-    private HashMap declaredGroups = new HashMap();
-    private StringBuffer allGroupsSB = new StringBuffer(256);
-    private StringBuffer groupSB = new StringBuffer(128);
+    private final HashMap<String, Group> declaredGroups = new HashMap<String, Group>();
+    private final StringBuffer allGroupsSB = new StringBuffer(256);
+    private final StringBuffer groupSB = new StringBuffer(128);
 
     /** The cache of PullHelpers. **/
-    private Map pullMap;
+    private final Map<String, IntakeTool.PullHelper> pullMap;
 
     /**
      * Constructor
      */
+    @SuppressWarnings("null")
     public IntakeTool()
     {
         String[] groupNames = IntakeServiceFacade.getGroupNames();
@@ -85,8 +85,8 @@ public class IntakeTool
         {
             groupCount = groupNames.length;
         }
-        groups = new HashMap((int) (1.25 * groupCount + 1));
-        pullMap = new HashMap((int) (1.25 * groupCount + 1));
+        groups = new HashMap<String, Group>((int) (1.25 * groupCount + 1));
+        pullMap = new HashMap<String, IntakeTool.PullHelper>((int) (1.25 * groupCount + 1));
 
         for (int i = groupCount - 1; i >= 0; i--)
         {
@@ -134,7 +134,7 @@ public class IntakeTool
                     }
                 }
             }
-            catch (Exception e)
+            catch (IntakeException e)
             {
                 log.error(e);
             }
@@ -280,7 +280,7 @@ public class IntakeTool
             String inputKey = IntakeServiceFacade.getGroupKey(groupName) + key;
             if (groups.containsKey(inputKey))
             {
-                g = (Group) groups.get(inputKey);
+                g = groups.get(inputKey);
             }
             else if (create)
             {
@@ -299,7 +299,6 @@ public class IntakeTool
          * @return an Intake Group
          */
         public Group mapTo(Retrievable obj)
-                throws IntakeException
         {
             Group g = null;
 
@@ -309,7 +308,7 @@ public class IntakeTool
                         + obj.getQueryKey();
                 if (groups.containsKey(inputKey))
                 {
-                    g = (Group) groups.get(inputKey);
+                    g = groups.get(inputKey);
                 }
                 else
                 {
@@ -319,7 +318,7 @@ public class IntakeTool
 
                 return g.init(obj);
             }
-            catch (Exception e)
+            catch (IntakeException e)
             {
                 log.error(e);
             }
@@ -332,9 +331,8 @@ public class IntakeTool
      * get a specific group
      */
     public PullHelper get(String groupName)
-            throws IntakeException
     {
-        return (PullHelper) pullMap.get(groupName);
+        return pullMap.get(groupName);
     }
 
     /**
@@ -346,7 +344,7 @@ public class IntakeTool
     public PullHelper get(String groupName, boolean throwExceptions)
             throws IntakeException
     {
-        return (PullHelper) pullMap.get(groupName);
+        return pullMap.get(groupName);
     }
 
     /**

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java Sun Mar  6 19:58:46 2011
@@ -28,9 +28,9 @@ public class JSONProcessor
             json_req = new JSONObject(cdata.toString());
             if (log.isDebugEnabled())
             {
-                String methodName = (String) json_req.getString("method");
+                String methodName = json_req.getString("method");
                 JSONArray arguments = json_req.getJSONArray("params");
-                
+
                 // If this a CallableReference it will have a non-zero objectID
                 int object_id = json_req.optInt("objectID");
                 StringBuffer sb = new StringBuffer(".doprocessCall(): call ");

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/jsp/TurbineJspService.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/jsp/TurbineJspService.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/jsp/TurbineJspService.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/jsp/TurbineJspService.java Sun Mar  6 19:58:46 2011
@@ -73,6 +73,7 @@ public class TurbineJspService
      * @throws InitializationException Something went wrong in the init
      *         stage
      */
+    @Override
     public void init()
         throws InitializationException
     {
@@ -97,6 +98,7 @@ public class TurbineJspService
      * @throws InitializationException Something went wrong when starting up.
      * @deprecated use init() instead.
      */
+    @Deprecated
     public void init(ServletConfig config)
         throws InitializationException
     {
@@ -173,7 +175,7 @@ public class TurbineJspService
         // get the RequestDispatcher for the JSP
         RequestDispatcher dispatcher = data.getServletContext()
             .getRequestDispatcher(relativeTemplateName);
-        
+
         try
         {
             if (isForward)
@@ -200,6 +202,7 @@ public class TurbineJspService
             }
             catch (IOException ignored)
             {
+                // ignore
             }
 
             // pass the exception to the caller according to the general
@@ -241,6 +244,7 @@ public class TurbineJspService
      * @param template The name of the requested Template
      * @return True if the template is available.
      */
+    @Override
     public boolean templateExists(String template)
     {
         for (int i = 0; i < templatePaths.length; i++)

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/jsp/util/JspNavigation.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/jsp/util/JspNavigation.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/jsp/util/JspNavigation.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/jsp/util/JspNavigation.java Sun Mar  6 19:58:46 2011
@@ -23,7 +23,6 @@ package org.apache.turbine.services.jsp.
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.turbine.modules.NavigationLoader;
 import org.apache.turbine.services.template.TurbineTemplate;
 import org.apache.turbine.util.RunData;
@@ -49,7 +48,7 @@ public class JspNavigation
     private static Log log = LogFactory.getLog(JspNavigation.class);
 
     /* The RunData object */
-    private RunData data;
+    private final RunData data;
 
     /**
      * Constructor
@@ -86,6 +85,7 @@ public class JspNavigation
             }
             catch (java.io.IOException ioe)
             {
+                // ignore
             }
         }
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/naming/TurbineNamingService.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/naming/TurbineNamingService.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/naming/TurbineNamingService.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/naming/TurbineNamingService.java Sun Mar  6 19:58:46 2011
@@ -28,6 +28,7 @@ import java.util.Properties;
 
 import javax.naming.Context;
 import javax.naming.InitialContext;
+import javax.naming.NamingException;
 
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.logging.Log;
@@ -57,15 +58,16 @@ public class TurbineNamingService
      * A global Map of Property objects which are initialised using
      * parameters from the ResourcesFile
      */
-    private static Map contextPropsList = null;
+    private static Map<String, Properties> contextPropsList = null;
 
     /** All initial contexts known to this service */
-    private Map initialContexts = new HashMap();
+    private final Map<String, InitialContext> initialContexts = new HashMap<String, InitialContext>();
 
     /**
      * Called the first time the Service is used.<br>
      *
      */
+    @Override
     public void init()
             throws InitializationException
     {
@@ -79,7 +81,7 @@ public class TurbineNamingService
         Configuration conf = Turbine.getConfiguration();
         try
         {
-            contextPropsList = new HashMap();
+            contextPropsList = new HashMap<String, Properties>();
 
             for (Iterator contextKeys = conf.subset("context").getKeys();
                  contextKeys.hasNext();)
@@ -97,8 +99,7 @@ public class TurbineNamingService
 
                 if (contextPropsList.containsKey(contextName))
                 {
-                    contextProps = (Properties)
-                            contextPropsList.get(contextName);
+                    contextProps = contextPropsList.get(contextName);
                 }
                 else
                 {
@@ -115,14 +116,14 @@ public class TurbineNamingService
                  contextPropsKeys.hasNext();)
             {
                 String key = (String) contextPropsKeys.next();
-                Properties contextProps = (Properties) contextPropsList.get(key);
+                Properties contextProps = contextPropsList.get(key);
                 InitialContext context = new InitialContext(contextProps);
                 initialContexts.put(key, context);
             }
 
             setInit(true);
         }
-        catch (Exception e)
+        catch (NamingException e)
         {
             log.error("Failed to initialize JDNI contexts!", e);
 
@@ -150,7 +151,7 @@ public class TurbineNamingService
 
         if (contextPropsList.containsKey(contextName))
         {
-            contextProps = (Properties) contextPropsList.get(contextName);
+            contextProps = contextPropsList.get(contextName);
         }
         else
         {

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePull.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePull.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePull.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePull.java Sun Mar  6 19:58:46 2011
@@ -161,6 +161,7 @@ public abstract class TurbinePull
         }
         catch (Exception e)
         {
+            // ignore
         }
         return null;
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePullService.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePullService.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePullService.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePullService.java Sun Mar  6 19:58:46 2011
@@ -557,6 +557,7 @@ public class TurbinePullService
      * @param user The <code>User</code> object whose storage to
      * retrieve the tool from.
      */
+    @SuppressWarnings({ "unused", "null" })
     private void populateWithSessionTools(List<ToolData> tools, Context context,
             PipelineData pipelineData, User user)
     {
@@ -646,6 +647,7 @@ public class TurbinePullService
      * @param user The <code>User</code> object whose storage to
      * retrieve the tool from.
      */
+    @SuppressWarnings({ "unused", "null" })
     private void populateWithSessionTools(List<ToolData> tools, Context context,
             RunData data, User user)
     {

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/ContentTool.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/ContentTool.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/ContentTool.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/ContentTool.java Sun Mar  6 19:58:46 2011
@@ -23,7 +23,6 @@ package org.apache.turbine.services.pull
 
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.turbine.Turbine;
 import org.apache.turbine.pipeline.PipelineData;
 import org.apache.turbine.services.pull.ApplicationTool;
@@ -85,6 +84,7 @@ public class ContentTool
      */
     public ContentTool()
     {
+        // empty
     }
 
     /*

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/TemplateLink.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/TemplateLink.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/TemplateLink.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/TemplateLink.java Sun Mar  6 19:58:46 2011
@@ -22,11 +22,9 @@ package org.apache.turbine.services.pull
 
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.fulcrum.parser.ParameterParser;
-
 import org.apache.turbine.Turbine;
 import org.apache.turbine.pipeline.PipelineData;
 import org.apache.turbine.services.pull.ApplicationTool;
@@ -90,6 +88,7 @@ public class TemplateLink
      */
     public TemplateLink()
     {
+        // empty
     }
 
     /*

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/UITool.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/UITool.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/UITool.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/pull/tools/UITool.java Sun Mar  6 19:58:46 2011
@@ -30,22 +30,22 @@ import org.apache.turbine.util.RunData;
 import org.apache.turbine.util.ServerData;
 
 /**
- * Manages all UI elements for a Turbine Application. Any UI element can be 
- * accessed in any template using the $ui handle (assuming you use the default 
- * PullService configuration). So, for example, you could access the background 
+ * Manages all UI elements for a Turbine Application. Any UI element can be
+ * accessed in any template using the $ui handle (assuming you use the default
+ * PullService configuration). So, for example, you could access the background
  * color for your pages by using $ui.bgcolor
  * <p>
- * This implementation provides a single level of inheritance in that if a 
- * property does not exist in a non-default skin, the value from the default 
- * skin will be used. By only requiring values different to those stored in 
+ * This implementation provides a single level of inheritance in that if a
+ * property does not exist in a non-default skin, the value from the default
+ * skin will be used. By only requiring values different to those stored in
  * the default skin to appear in the non-default skins the amount of memory
- * consumed in cases where the UserManager instance is used at a non-global 
- * scope will potentially be reduced due to the fact that a shared instance of 
+ * consumed in cases where the UserManager instance is used at a non-global
+ * scope will potentially be reduced due to the fact that a shared instance of
  * the default skin properties can be used. Note that this inheritance only
  * applies to property values - it does not apply to any images or stylesheets
  * that may form part of your skins.
  * <p>
- * This is an application pull tool for the template system. You should not  
+ * This is an application pull tool for the template system. You should not
  * use it in a normal application!  Within Java code you should use TurbineUI.
  * <p>
  *
@@ -87,7 +87,7 @@ public class UITool implements Applicati
 
     /**
      * Provide access to the list of available skin names.
-     * 
+     *
      * @return the available skin names.
      */
     public String[] getSkinNames()
@@ -96,12 +96,12 @@ public class UITool implements Applicati
     }
 
     /**
-     * Get the name of the default skin name for the web application from the 
-     * TurbineResources.properties file. If the property is not present the 
+     * Get the name of the default skin name for the web application from the
+     * TurbineResources.properties file. If the property is not present the
      * name of the default skin will be returned.  Note that the web application
-     * skin name may be something other than default, in which case its 
+     * skin name may be something other than default, in which case its
      * properties will default to the skin with the name "default".
-     * 
+     *
      * @return the name of the default skin for the web application.
      */
     public String getWebappSkinName()
@@ -112,12 +112,12 @@ public class UITool implements Applicati
     /**
      * Retrieve a skin property.  If the property is not defined in the current
      * skin the value for the default skin will be provided.  If the current
-     * skin does not exist then the skin configured for the webapp will be used.  
-     * If the webapp skin does not exist the default skin will be used.  If the 
+     * skin does not exist then the skin configured for the webapp will be used.
+     * If the webapp skin does not exist the default skin will be used.  If the
      * default skin does not exist then <code>null</code> will be returned.
-     * 
+     *
      * @param key the key to retrieve from the skin.
-     * @return the value of the property for the named skin (defaulting to the 
+     * @return the value of the property for the named skin (defaulting to the
      * default skin), the webapp skin, the default skin or <code>null</code>,
      * depending on whether or not the property or skins exist.
      */
@@ -135,7 +135,7 @@ public class UITool implements Applicati
     }
 
     /**
-     * Set the skin name to the skin from the TurbineResources.properties file. 
+     * Set the skin name to the skin from the TurbineResources.properties file.
      * If the property is not present use the "default" skin.
      */
     public void setSkin()
@@ -154,10 +154,10 @@ public class UITool implements Applicati
     }
 
     /**
-     * Set the skin name when the tool is configured to be loaded on a 
-     * per-request basis. By default it calls getSkin to return the skin 
-     * specified in TurbineResources.properties. Developers can write a subclass 
-     * of UITool that overrides this method to determine the skin to use based 
+     * Set the skin name when the tool is configured to be loaded on a
+     * per-request basis. By default it calls getSkin to return the skin
+     * specified in TurbineResources.properties. Developers can write a subclass
+     * of UITool that overrides this method to determine the skin to use based
      * on information held in the request.
      *
      * @param data a RunData instance
@@ -168,10 +168,10 @@ public class UITool implements Applicati
     }
 
     /**
-     * Set the skin name when the tool is configured to be loaded on a 
-     * per-session basis. If the user's temp hashmap contains a value in the 
-     * attribute specified by the String constant SKIN_ATTRIBUTE then that is 
-     * returned. Otherwise it calls getSkin to return the skin specified in 
+     * Set the skin name when the tool is configured to be loaded on a
+     * per-session basis. If the user's temp hashmap contains a value in the
+     * attribute specified by the String constant SKIN_ATTRIBUTE then that is
+     * returned. Otherwise it calls getSkin to return the skin specified in
      * TurbineResources.properties.
      *
      * @param user a User instance
@@ -200,16 +200,16 @@ public class UITool implements Applicati
     }
 
     /**
-     * Retrieve the URL for an image that is part of the skin. The images are 
+     * Retrieve the URL for an image that is part of the skin. The images are
      * stored in the WEBAPP/resources/ui/skins/[SKIN]/images directory.
      *
-     * <p>Use this if for some reason your server name, server scheme, or server 
-     * port change on a per request basis. I'm not sure if this would happen in 
+     * <p>Use this if for some reason your server name, server scheme, or server
+     * port change on a per request basis. I'm not sure if this would happen in
      * a load balanced situation. I think in most cases the image(String image)
      * method would probably be enough, but I'm not absolutely positive.
-     * 
+     *
      * @param imageId the id of the image whose URL will be generated.
-     * @param data the RunDate to use as the source of the ServerData to use as 
+     * @param data the RunDate to use as the source of the ServerData to use as
      * the basis for the URL.
      */
     public String image(String imageId, RunData data)
@@ -218,14 +218,14 @@ public class UITool implements Applicati
     }
 
     /**
-     * Retrieve the URL for an image that is part of the skin. The images are 
+     * Retrieve the URL for an image that is part of the skin. The images are
      * stored in the WEBAPP/resources/ui/skins/[SKIN]/images directory.
      *
-     * <p>Use this if for some reason your server name, server scheme, or server 
-     * port change on a per request basis. I'm not sure if this would happen in 
+     * <p>Use this if for some reason your server name, server scheme, or server
+     * port change on a per request basis. I'm not sure if this would happen in
      * a load balanced situation. I think in most cases the image(String image)
      * method would probably be enough, but I'm not absolutely positive.
-     * 
+     *
      * @param imageId the id of the image whose URL will be generated.
      * @param serverData the serverData to use as the basis for the URL.
      */
@@ -235,9 +235,9 @@ public class UITool implements Applicati
     }
 
     /**
-     * Retrieve the URL for an image that is part of the skin. The images are 
+     * Retrieve the URL for an image that is part of the skin. The images are
      * stored in the WEBAPP/resources/ui/skins/[SKIN]/images directory.
-     * 
+     *
      * @param imageId the id of the image whose URL will be generated.
      */
     public String image(String imageId)
@@ -246,16 +246,16 @@ public class UITool implements Applicati
     }
 
     /**
-     * Retrieve the URL for the style sheet that is part of the skin. The style 
-     * is stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the 
+     * Retrieve the URL for the style sheet that is part of the skin. The style
+     * is stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the
      * filename skin.css
      *
-     * <p>Use this if for some reason your server name, server scheme, or server 
-     * port change on a per request basis. I'm not sure if this would happen in 
-     * a load balanced situation. I think in most cases the style() method would 
+     * <p>Use this if for some reason your server name, server scheme, or server
+     * port change on a per request basis. I'm not sure if this would happen in
+     * a load balanced situation. I think in most cases the style() method would
      * probably be enough, but I'm not absolutely positive.
-     * 
-     * @param data the RunDate to use as the source of the ServerData to use as 
+     *
+     * @param data the RunDate to use as the source of the ServerData to use as
      * the basis for the URL.
      */
     public String getStylecss(RunData data)
@@ -264,15 +264,15 @@ public class UITool implements Applicati
     }
 
     /**
-     * Retrieve the URL for the style sheet that is part of the skin. The style 
-     * is stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the 
+     * Retrieve the URL for the style sheet that is part of the skin. The style
+     * is stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the
      * filename skin.css
      *
-     * <p>Use this if for some reason your server name, server scheme, or server 
-     * port change on a per request basis. I'm not sure if this would happen in 
-     * a load balanced situation. I think in most cases the style() method would 
+     * <p>Use this if for some reason your server name, server scheme, or server
+     * port change on a per request basis. I'm not sure if this would happen in
+     * a load balanced situation. I think in most cases the style() method would
      * probably be enough, but I'm not absolutely positive.
-     * 
+     *
      * @param serverData the serverData to use as the basis for the URL.
      */
     public String getStylecss(ServerData serverData)
@@ -281,8 +281,8 @@ public class UITool implements Applicati
     }
 
     /**
-     * Retrieve the URL for the style sheet that is part of the skin. The style 
-     * is stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the 
+     * Retrieve the URL for the style sheet that is part of the skin. The style
+     * is stored in the WEBAPP/resources/ui/skins/[SKIN] directory with the
      * filename skin.css
      */
     public String getStylecss()
@@ -294,13 +294,13 @@ public class UITool implements Applicati
      * Retrieve the URL for a given script that is part of the skin. The script
      * is stored in the WEBAPP/resources/ui/skins/[SKIN] directory.
      *
-     * <p>Use this if for some reason your server name, server scheme, or server 
-     * port change on a per request basis. I'm not sure if this would happen in 
+     * <p>Use this if for some reason your server name, server scheme, or server
+     * port change on a per request basis. I'm not sure if this would happen in
      * a load balanced situation. I think in most cases the image(String image)
      * method would probably be enough, but I'm not absolutely positive.
-     * 
+     *
      * @param filename the name of the script file whose URL will be generated.
-     * @param data the RunDate to use as the source of the ServerData to use as 
+     * @param data the RunDate to use as the source of the ServerData to use as
      * the basis for the URL.
      */
     public String getScript(String filename, RunData data)
@@ -312,11 +312,11 @@ public class UITool implements Applicati
      * Retrieve the URL for a given script that is part of the skin. The script
      * is stored in the WEBAPP/resources/ui/skins/[SKIN] directory.
      *
-     * <p>Use this if for some reason your server name, server scheme, or server 
-     * port change on a per request basis. I'm not sure if this would happen in 
+     * <p>Use this if for some reason your server name, server scheme, or server
+     * port change on a per request basis. I'm not sure if this would happen in
      * a load balanced situation. I think in most cases the image(String image)
      * method would probably be enough, but I'm not absolutely positive.
-     * 
+     *
      * @param filename the name of the script file whose URL will be generated.
      * @param serverData the serverData to use as the basis for the URL.
      */
@@ -339,7 +339,7 @@ public class UITool implements Applicati
     /**
      * Initialize the UITool object.
      *
-     * @param data This is null, RunData or User depending upon specified tool 
+     * @param data This is null, RunData or User depending upon specified tool
      * scope.
      */
     public void init(Object data)

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/pull/util/DateFormatter.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/pull/util/DateFormatter.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/pull/util/DateFormatter.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/pull/util/DateFormatter.java Sun Mar  6 19:58:46 2011
@@ -39,7 +39,7 @@ public class DateFormatter
         implements ApplicationTool
 {
     /** Used for formatting date objects */
-    private SimpleDateFormat sdf = new SimpleDateFormat();
+    private final SimpleDateFormat sdf = new SimpleDateFormat();
 
     /** Default date format */
     private static final String DATE_FORMAT_DEFAULT = "MM/dd/yyyy";
@@ -77,6 +77,7 @@ public class DateFormatter
      */
     public void refresh()
     {
+        // empty
     }
 
     /**

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/rundata/TurbineRunDataService.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/rundata/TurbineRunDataService.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/rundata/TurbineRunDataService.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/rundata/TurbineRunDataService.java Sun Mar  6 19:58:46 2011
@@ -73,7 +73,7 @@ public class TurbineRunDataService
         DefaultCookieParser.class.getName();
 
     /** The map of configurations. */
-    private Map<String, Object> configurations = new HashMap<String, Object>();
+    private final Map<String, Object> configurations = new HashMap<String, Object>();
 
     /** Private reference to the pool service for object recycling */
     private PoolService pool = null;
@@ -86,6 +86,7 @@ public class TurbineRunDataService
      */
     public TurbineRunDataService()
     {
+        super();
     }
 
     /**
@@ -141,9 +142,9 @@ public class TurbineRunDataService
                 }
             }
         }
-        
+
 		pool = (PoolService)TurbineServices.getInstance().getService(PoolService.ROLE);
-        
+
         if (pool == null)
         {
             throw new InitializationException("RunData Service requires"
@@ -151,7 +152,7 @@ public class TurbineRunDataService
         }
 
         parserService = (ParserService)TurbineServices.getInstance().getService(ParserService.ROLE);
-        
+
         if (parserService == null)
         {
             throw new InitializationException("RunData Service requires"
@@ -235,15 +236,15 @@ public class TurbineRunDataService
             // also copy data directly into pipelineData
             pipelineDataMap.put(ParameterParser.class, pp);
             pipelineDataMap.put(CookieParser.class, cp);
-            
+
             Locale locale = req.getLocale();
-            
+
             if (locale == null)
             {
                 // get the default from the Turbine configuration
                 locale = data.getLocale();
             }
-            
+
             // set the locale detected and propagate it to the parsers
             data.setLocale(locale);
         }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/schedule/JobEntry.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/schedule/JobEntry.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/schedule/JobEntry.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/schedule/JobEntry.java Sun Mar  6 19:58:46 2011
@@ -24,7 +24,7 @@ public  class JobEntry
     implements Persistent
 {
     /**
-     * 
+     *
      */
     private static final long serialVersionUID = -5501116588294474363L;
 
@@ -49,6 +49,7 @@ public  class JobEntry
      */
     public JobEntry()
     {
+        // empty
     }
 
     /**

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/schedule/SchedulerTool.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/schedule/SchedulerTool.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/schedule/SchedulerTool.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/schedule/SchedulerTool.java Sun Mar  6 19:58:46 2011
@@ -58,6 +58,7 @@ public class SchedulerTool implements Ap
      */
     public void refresh()
     {
+        // empty
     }
 
     /**

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/schedule/TurbineSchedulerService.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/schedule/TurbineSchedulerService.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/schedule/TurbineSchedulerService.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/schedule/TurbineSchedulerService.java Sun Mar  6 19:58:46 2011
@@ -26,10 +26,8 @@ import javax.servlet.ServletConfig;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.torque.TorqueException;
 import org.apache.torque.util.Criteria;
-
 import org.apache.turbine.services.InitializationException;
 import org.apache.turbine.services.TurbineBaseService;
 import org.apache.turbine.util.TurbineException;
@@ -46,13 +44,13 @@ public class TurbineSchedulerService
         implements ScheduleService
 {
     /** Logging */
-    private static Log log = LogFactory.getLog(ScheduleService.LOGGER_NAME);
+    protected static Log log = LogFactory.getLog(ScheduleService.LOGGER_NAME);
 
     /** The queue */
     protected JobQueue scheduleQueue = null;
 
     /** Current status of the scheduler */
-    private boolean enabled = false;
+    protected boolean enabled = false;
 
     /** The main loop for starting jobs. */
     protected MainLoop mainLoop;
@@ -308,7 +306,7 @@ public class TurbineSchedulerService
     /**
      * Set thread to null to indicate termination.
      */
-    private synchronized void clearThread()
+    protected synchronized void clearThread()
     {
         thread = null;
     }
@@ -351,7 +349,7 @@ public class TurbineSchedulerService
      * @return A JobEntry.
      * @exception TurbineException a generic exception.
      */
-    private synchronized JobEntry nextJob()
+    protected synchronized JobEntry nextJob()
             throws TurbineException
     {
         try
@@ -388,6 +386,7 @@ public class TurbineSchedulerService
         }
         catch (InterruptedException ex)
         {
+            // ignore
         }
 
         // On interrupt.

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/BaseSecurityService.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/BaseSecurityService.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/BaseSecurityService.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/BaseSecurityService.java Sun Mar  6 19:58:46 2011
@@ -211,6 +211,8 @@ public abstract class BaseSecurityServic
      *
      * @throws InitializationException Something went wrong in the init stage
      */
+    @Override
+    @SuppressWarnings("unchecked")
     public void init()
             throws InitializationException
     {

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/UserManager.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/UserManager.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/UserManager.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/UserManager.java Sun Mar  6 19:58:46 2011
@@ -22,7 +22,6 @@ package org.apache.turbine.services.secu
 import java.util.List;
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.turbine.om.security.User;
 import org.apache.turbine.services.InitializationException;
 import org.apache.turbine.util.security.DataBackendException;
@@ -111,6 +110,7 @@ public interface UserManager
      *         storage.
      * @deprecated Use retrieveList(Criteria crit)
      */
+    @Deprecated
     User[] retrieve(Object criteria) throws DataBackendException;
 
     /**
@@ -127,7 +127,7 @@ public interface UserManager
      * @throws DataBackendException if there is a problem accessing the
      *         storage.
      */
-    List retrieveList(Object criteria)
+    List<User> retrieveList(Object criteria)
         throws DataBackendException;
 
     /**

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPSecurityService.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPSecurityService.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPSecurityService.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPSecurityService.java Sun Mar  6 19:58:46 2011
@@ -23,6 +23,7 @@ import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
+
 import javax.naming.NameAlreadyBoundException;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
@@ -98,8 +99,8 @@ public class LDAPSecurityService extends
         }
         try
         {
-            Hashtable roles = new Hashtable();
-            Hashtable permissions = new Hashtable();
+            Hashtable<Group, RoleSet> roles = new Hashtable<Group, RoleSet>();
+            Hashtable<Group, PermissionSet> permissions = new Hashtable<Group, PermissionSet>();
 
             // notify the state modifiers (writers) that we want to create
             // the snapshot.
@@ -431,7 +432,7 @@ public class LDAPSecurityService extends
      */
     public Group getNewGroup(String groupName)
     {
-        return (Group) new TurbineGroup(groupName);
+        return new TurbineGroup(groupName);
     }
 
     /**
@@ -445,7 +446,7 @@ public class LDAPSecurityService extends
      */
     public Role getNewRole(String roleName)
     {
-        return (Role) new TurbineRole(roleName);
+        return new TurbineRole(roleName);
     }
 
     /**
@@ -460,7 +461,7 @@ public class LDAPSecurityService extends
      */
     public Permission getNewPermission(String permissionName)
     {
-        return (Permission) new TurbinePermission(permissionName);
+        return new TurbinePermission(permissionName);
     }
 
     /**
@@ -473,7 +474,7 @@ public class LDAPSecurityService extends
     public GroupSet getGroups(Object criteria)
             throws DataBackendException
     {
-        Vector groups = new Vector();
+        Vector<Group> groups = new Vector<Group>();
 
         try
         {
@@ -520,7 +521,7 @@ public class LDAPSecurityService extends
     private RoleSet getRoles(User user, Group group)
             throws DataBackendException
     {
-        Vector roles = new Vector(0);
+        Vector<Role> roles = new Vector<Role>();
 
         try
         {
@@ -584,7 +585,7 @@ public class LDAPSecurityService extends
      */
     public RoleSet getRoles(Object criteria) throws DataBackendException
     {
-        Vector roles = new Vector(0);
+        Vector<Role> roles = new Vector<Role>();
 
         try
         {
@@ -636,7 +637,7 @@ public class LDAPSecurityService extends
     public PermissionSet getPermissions(Object criteria)
             throws DataBackendException
     {
-        Vector permissions = new Vector();
+        Vector<Permission> permissions = new Vector<Permission>();
 
         try
         {
@@ -689,7 +690,7 @@ public class LDAPSecurityService extends
     public PermissionSet getPermissions(Role role)
             throws DataBackendException, UnknownEntityException
     {
-        Hashtable permissions = new Hashtable();
+        Hashtable<String, Permission> permissions = new Hashtable<String, Permission>();
 
         try
         {
@@ -1226,6 +1227,7 @@ public class LDAPSecurityService extends
     /* (non-Javadoc)
      * @see org.apache.turbine.services.security.SecurityService#getAllGroups()
      */
+    @Override
     public GroupSet getAllGroups() throws DataBackendException {
         // TODO Auto-generated method stub
         return null;
@@ -1233,6 +1235,7 @@ public class LDAPSecurityService extends
     /* (non-Javadoc)
      * @see org.apache.turbine.services.security.SecurityService#getAllPermissions()
      */
+    @Override
     public PermissionSet getAllPermissions() throws DataBackendException {
         // TODO Auto-generated method stub
         return null;
@@ -1240,6 +1243,7 @@ public class LDAPSecurityService extends
     /* (non-Javadoc)
      * @see org.apache.turbine.services.security.SecurityService#getAllRoles()
      */
+    @Override
     public RoleSet getAllRoles() throws DataBackendException {
         // TODO Auto-generated method stub
         return null;
@@ -1247,7 +1251,7 @@ public class LDAPSecurityService extends
     /* (non-Javadoc)
      * @see org.apache.turbine.services.security.SecurityService#getUserList(java.lang.Object)
      */
-    public List getUserList(Object criteria) throws DataBackendException {
+    public List<User> getUserList(Object criteria) throws DataBackendException {
         // TODO Auto-generated method stub
         return null;
     }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPUser.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPUser.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPUser.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPUser.java Sun Mar  6 19:58:46 2011
@@ -49,6 +49,9 @@ import org.apache.turbine.services.secur
 public class LDAPUser implements User
 {
 
+    /** Serial version */
+    private static final long serialVersionUID = -7919950833581382438L;
+
     /** Logging */
     private static Log log = LogFactory.getLog(LDAPUser.class);
 
@@ -64,10 +67,10 @@ public class LDAPUser implements User
     private int timeout = 15;
 
     /** This is data that will survive a servlet engine restart. */
-    private Hashtable permStorage = null;
+    private Hashtable<String, Object> permStorage = null;
 
     /** This is data that will not survive a servlet engine restart. */
-    private Hashtable tempStorage = null;
+    private Hashtable<String, Object> tempStorage = null;
 
     /**
      * Constructor.
@@ -76,8 +79,8 @@ public class LDAPUser implements User
     public LDAPUser()
     {
         createDate = new java.util.Date();
-        tempStorage = new Hashtable(10);
-        permStorage = new Hashtable(10);
+        tempStorage = new Hashtable<String, Object>(10);
+        permStorage = new Hashtable<String, Object>(10);
         setHasLoggedIn(Boolean.FALSE);
     }
 
@@ -447,11 +450,11 @@ public class LDAPUser implements User
      *
      * @return A Hashtable.
      */
-    public Hashtable getPermStorage()
+    public Hashtable<String, Object> getPermStorage()
     {
         if (this.permStorage == null)
         {
-            this.permStorage = new Hashtable();
+            this.permStorage = new Hashtable<String, Object>();
         }
         return this.permStorage;
     }
@@ -720,7 +723,7 @@ public class LDAPUser implements User
      *
      * @param stuff A Hashtable.
      */
-    public void setPermStorage(Hashtable stuff)
+    public void setPermStorage(Hashtable<String, Object> stuff)
     {
         this.permStorage = stuff;
     }
@@ -731,11 +734,11 @@ public class LDAPUser implements User
      *
      * @return A Hashtable.
      */
-    public Hashtable getTempStorage()
+    public Hashtable<String, Object> getTempStorage()
     {
         if (this.tempStorage == null)
         {
-            this.tempStorage = new Hashtable();
+            this.tempStorage = new Hashtable<String, Object>();
         }
         return this.tempStorage;
     }
@@ -746,7 +749,7 @@ public class LDAPUser implements User
      *
      * @param storage A Hashtable.
      */
-    public void setTempStorage(Hashtable storage)
+    public void setTempStorage(Hashtable<String, Object> storage)
     {
         this.tempStorage = storage;
     }
@@ -903,6 +906,7 @@ public class LDAPUser implements User
      */
     public void setId(int id)
     {
+        // not implemented
     }
 
     /**

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPUserManager.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPUserManager.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPUserManager.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/ldap/LDAPUserManager.java Sun Mar  6 19:58:46 2011
@@ -19,8 +19,8 @@ package org.apache.turbine.services.secu
  * under the License.
  */
 
-import java.util.List;
 import java.util.Hashtable;
+import java.util.List;
 import java.util.Vector;
 
 import javax.naming.AuthenticationException;
@@ -33,7 +33,6 @@ import javax.naming.directory.SearchCont
 import javax.naming.directory.SearchResult;
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.turbine.om.security.User;
 import org.apache.turbine.services.security.TurbineSecurity;
 import org.apache.turbine.services.security.UserManager;
@@ -103,7 +102,7 @@ public class LDAPUserManager implements 
     {
         try
         {
-            User ldapUser = retrieve(username);
+            /* User ldapUser = */ retrieve(username);
         }
         catch (UnknownEntityException ex)
         {
@@ -187,10 +186,11 @@ public class LDAPUserManager implements 
      * @throws DataBackendException Error accessing the data backend.
      * @deprecated Use <a href="#retrieveList">retrieveList</a> instead.
      */
+    @Deprecated
     public User[] retrieve(Object criteria)
             throws DataBackendException
     {
-        return (User []) retrieveList(criteria).toArray(new User[0]);
+        return retrieveList(criteria).toArray(new User[0]);
     }
 
     /**
@@ -207,10 +207,10 @@ public class LDAPUserManager implements 
      * @throws DataBackendException if there is a problem accessing the
      *         storage.
      */
-    public List retrieveList(Object criteria)
+    public List<User> retrieveList(Object criteria)
             throws DataBackendException
     {
-        List users = new Vector(0);
+        List<User> users = new Vector<User>();
 
         try
         {
@@ -511,7 +511,7 @@ public class LDAPUserManager implements 
          * creating an initial context using Sun's client
          * LDAP Provider.
          */
-        Hashtable env = new Hashtable();
+        Hashtable<String, Object> env = new Hashtable<String, Object>();
 
         env.put(Context.INITIAL_CONTEXT_FACTORY, ldapProvider);
         env.put(Context.PROVIDER_URL, providerURL);

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/passive/PassiveUserManager.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/passive/PassiveUserManager.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/passive/PassiveUserManager.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/passive/PassiveUserManager.java Sun Mar  6 19:58:46 2011
@@ -24,7 +24,6 @@ package org.apache.turbine.services.secu
 import java.util.List;
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.turbine.om.security.User;
 import org.apache.turbine.services.security.UserManager;
 import org.apache.turbine.util.security.DataBackendException;
@@ -117,6 +116,7 @@ public class PassiveUserManager implemen
      *         storage.
      * @deprecated Use <a href="#retrieveList">retrieveList</a> instead.
      */
+    @Deprecated
     public User[] retrieve(Object criteria)
             throws DataBackendException
     {
@@ -137,7 +137,7 @@ public class PassiveUserManager implemen
      * @throws DataBackendException if there is a problem accessing the
      *         storage.
      */
-    public List retrieveList(Object criteria)
+    public List<User> retrieveList(Object criteria)
             throws DataBackendException
     {
         throw new DataBackendException("PassiveUserManager knows no users");

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/GroupPeerManager.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/GroupPeerManager.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/GroupPeerManager.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/GroupPeerManager.java Sun Mar  6 19:58:46 2011
@@ -20,21 +20,17 @@ package org.apache.turbine.services.secu
  */
 
 import java.beans.PropertyDescriptor;
-
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.torque.TorqueException;
 import org.apache.torque.om.Persistent;
 import org.apache.torque.util.BasePeer;
 import org.apache.torque.util.Criteria;
-
 import org.apache.turbine.om.security.Group;
 import org.apache.turbine.services.InitializationException;
 import org.apache.turbine.services.security.TurbineSecurity;
@@ -54,10 +50,10 @@ public class GroupPeerManager
     implements GroupPeerManagerConstants
 {
     /** The class of the Peer the TorqueSecurityService uses */
-    private static Class groupPeerClass = null;
+    private static Class<?> groupPeerClass = null;
 
     /** The class name of the objects returned by the configured peer. */
-    private static Class groupObject = null;
+    private static Class<?> groupObject = null;
 
     /** The name of the Table used for Group Object queries  */
     private static String tableName = null;
@@ -417,7 +413,7 @@ public class GroupPeerManager
      *
      * @exception TorqueException A problem occured.
      */
-    public static List doSelect(Criteria criteria)
+    public static List<Group> doSelect(Criteria criteria)
         throws TorqueException
     {
         List list;
@@ -435,7 +431,7 @@ public class GroupPeerManager
         {
             throw new TorqueException("doSelect failed", e);
         }
-        List newList = new ArrayList(list.size());
+        List<Group> newList = new ArrayList<Group>(list.size());
 
         //
         // Wrap the returned Objects into the configured Peer Objects.
@@ -651,12 +647,12 @@ public class GroupPeerManager
         Group g = null;
         try
         {
-            Class groupWrapperClass = TurbineSecurity.getGroupClass();
+            Class<? extends Group> groupWrapperClass = TurbineSecurity.getGroupClass();
 
             Class [] clazz = new Class [] { Persistent.class };
             Object [] params = new Object [] { p };
 
-            g = (Group) groupWrapperClass
+            g = groupWrapperClass
                 .getConstructor(clazz)
                 .newInstance(params);
         }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/PermissionPeerManager.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/PermissionPeerManager.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/PermissionPeerManager.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/PermissionPeerManager.java Sun Mar  6 19:58:46 2011
@@ -20,18 +20,19 @@ package org.apache.turbine.services.secu
  */
 
 import java.beans.PropertyDescriptor;
-
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.Enumeration;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
+import org.apache.torque.TorqueException;
+import org.apache.torque.om.Persistent;
+import org.apache.torque.util.BasePeer;
+import org.apache.torque.util.Criteria;
 import org.apache.turbine.om.security.Permission;
 import org.apache.turbine.om.security.Role;
 import org.apache.turbine.services.InitializationException;
@@ -40,11 +41,6 @@ import org.apache.turbine.services.secur
 import org.apache.turbine.util.security.DataBackendException;
 import org.apache.turbine.util.security.PermissionSet;
 
-import org.apache.torque.TorqueException;
-import org.apache.torque.om.Persistent;
-import org.apache.torque.util.BasePeer;
-import org.apache.torque.util.Criteria;
-
 /**
  * This class capsulates all direct Peer access for the Permission entities.
  * It allows the exchange of the default Turbine supplied TurbinePermissionPeer
@@ -59,10 +55,10 @@ public class PermissionPeerManager
     implements PermissionPeerManagerConstants
 {
     /** The class of the Peer the TorqueSecurityService uses */
-    private static Class persistentPeerClass = null;
+    private static Class<?> persistentPeerClass = null;
 
     /** The class name of the objects returned by the configured peer. */
-    private static Class permissionObject = null;
+    private static Class<?> permissionObject = null;
 
     /** The name of the Table used for Permission Object queries  */
     private static String tableName = null;
@@ -473,7 +469,7 @@ public class PermissionPeerManager
      *
      * @exception TorqueException A problem occured.
      */
-    public static List doSelect(Criteria criteria)
+    public static List<Permission> doSelect(Criteria criteria)
         throws TorqueException
     {
         List list;
@@ -493,7 +489,7 @@ public class PermissionPeerManager
             throw new TorqueException("doSelect failed", e);
         }
 
-        List newList = new ArrayList(list.size());
+        List<Permission> newList = new ArrayList<Permission>(list.size());
 
         //
         // Wrap the returned Objects into TorquePermissions.
@@ -707,12 +703,12 @@ public class PermissionPeerManager
         Permission perm = null;
         try
         {
-            Class permissionWrapperClass = TurbineSecurity.getPermissionClass();
+            Class<? extends Permission> permissionWrapperClass = TurbineSecurity.getPermissionClass();
 
             Class [] clazz = new Class [] { Persistent.class };
             Object [] params = new Object [] { p };
 
-            perm = (Permission) permissionWrapperClass
+            perm = permissionWrapperClass
               .getConstructor(clazz)
               .newInstance(params);
         }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/RolePeerManager.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/RolePeerManager.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/RolePeerManager.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/RolePeerManager.java Sun Mar  6 19:58:46 2011
@@ -20,16 +20,17 @@ package org.apache.turbine.services.secu
  */
 
 import java.beans.PropertyDescriptor;
-
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
+import org.apache.torque.TorqueException;
+import org.apache.torque.om.Persistent;
+import org.apache.torque.util.BasePeer;
+import org.apache.torque.util.Criteria;
 import org.apache.turbine.om.security.Group;
 import org.apache.turbine.om.security.Role;
 import org.apache.turbine.om.security.User;
@@ -39,11 +40,6 @@ import org.apache.turbine.services.secur
 import org.apache.turbine.util.security.DataBackendException;
 import org.apache.turbine.util.security.RoleSet;
 
-import org.apache.torque.TorqueException;
-import org.apache.torque.om.Persistent;
-import org.apache.torque.util.BasePeer;
-import org.apache.torque.util.Criteria;
-
 /**
  * This class capsulates all direct Peer access for the Role entities.
  * It allows the exchange of the default Turbine supplied TurbineRolePeer
@@ -57,10 +53,10 @@ public class RolePeerManager
     implements RolePeerManagerConstants
 {
     /** The class of the Peer the TorqueSecurityService uses */
-    private static Class rolePeerClass = null;
+    private static Class<?> rolePeerClass = null;
 
     /** The class name of the objects returned by the configured peer. */
-    private static Class roleObject = null;
+    private static Class<?> roleObject = null;
 
     /** The name of the Table used for Role Object queries  */
     private static String tableName = null;
@@ -453,7 +449,7 @@ public class RolePeerManager
      *
      * @exception TorqueException A problem occured.
      */
-    public static List doSelect(Criteria criteria)
+    public static List<Role> doSelect(Criteria criteria)
         throws TorqueException
     {
         List list;
@@ -472,7 +468,7 @@ public class RolePeerManager
         {
             throw new TorqueException("doSelect failed", e);
         }
-        List newList = new ArrayList(list.size());
+        List<Role> newList = new ArrayList<Role>(list.size());
 
         //
         // Wrap the returned Objects into TorqueRoles.
@@ -687,12 +683,12 @@ public class RolePeerManager
         Role r = null;
         try
         {
-            Class roleWrapperClass = TurbineSecurity.getRoleClass();
+            Class<? extends Role> roleWrapperClass = TurbineSecurity.getRoleClass();
 
             Class [] clazz = new Class [] { Persistent.class };
             Object [] params = new Object [] { p };
 
-            r = (Role) roleWrapperClass
+            r = roleWrapperClass
                 .getConstructor(clazz)
                 .newInstance(params);
         }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueSecurityService.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueSecurityService.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueSecurityService.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueSecurityService.java Sun Mar  6 19:58:46 2011
@@ -503,7 +503,7 @@ public class TorqueSecurityService
                 torqueCriteria.put(GroupPeerManager.getColumnName(key),
                         c.get(key));
             }
-            List groups = new ArrayList(0);
+            List<Group> groups = new ArrayList<Group>(0);
             try
             {
                 groups = GroupPeerManager.doSelect(torqueCriteria);
@@ -544,7 +544,7 @@ public class TorqueSecurityService
                 torqueCriteria.put(RolePeerManager.getColumnName(key),
                         c.get(key));
             }
-            List roles = new ArrayList(0);
+            List<Role> roles = new ArrayList<Role>(0);
             try
             {
                 roles = RolePeerManager.doSelect(torqueCriteria);
@@ -584,7 +584,7 @@ public class TorqueSecurityService
                 torqueCriteria.put(PermissionPeerManager.getColumnName(key),
                         c.get(key));
             }
-            List permissions = new ArrayList(0);
+            List<Permission> permissions = new ArrayList<Permission>(0);
             try
             {
                 permissions = PermissionPeerManager.doSelect(torqueCriteria);

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueUser.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueUser.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueUser.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueUser.java Sun Mar  6 19:58:46 2011
@@ -557,6 +557,7 @@ public class TorqueUser
      *
      * @return A Hashtable.
      */
+    @SuppressWarnings("unchecked")
     public Hashtable<String, Object> getPermStorage()
     {
         if (permStorage == null)

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueUserManager.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueUserManager.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueUserManager.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/TorqueUserManager.java Sun Mar  6 19:58:46 2011
@@ -186,10 +186,11 @@ public class TorqueUserManager
      * @throws DataBackendException if there is a problem accessing the
      *         storage.
      */
+    @Deprecated
     public User[] retrieve(Object criteria)
         throws DataBackendException
     {
-        return (User [])retrieveList(criteria).toArray(new User[0]);
+        return retrieveList(criteria).toArray(new User[0]);
     }
 
     /**
@@ -206,7 +207,7 @@ public class TorqueUserManager
      * @throws DataBackendException if there is a problem accessing the
      *         storage.
      */
-    public List retrieveList(Object criteria)
+    public List<User> retrieveList(Object criteria)
         throws DataBackendException
     {
         if (criteria instanceof Criteria)
@@ -215,11 +216,11 @@ public class TorqueUserManager
             for (Iterator keys = c.keySet().iterator(); keys.hasNext(); )
             {
                 String key = (String) keys.next();
-    
+
                 // set the table name for all attached criterion
-                Criteria.Criterion[] criterion = 
+                Criteria.Criterion[] criterion =
                     c.getCriterion(key).getAttachedCriterion();
-    
+
                 for (int i = 0; i < criterion.length; i++)
                 {
                     if (StringUtils.isEmpty(criterion[i].getTable()))
@@ -228,7 +229,7 @@ public class TorqueUserManager
                     }
                 }
             }
-            List users = null;
+            List<User> users = null;
             try
             {
                 users = UserPeerManager.doSelect(c);

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/UserPeerManager.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/UserPeerManager.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/UserPeerManager.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/UserPeerManager.java Sun Mar  6 19:58:46 2011
@@ -20,21 +20,17 @@ package org.apache.turbine.services.secu
  */
 
 import java.beans.PropertyDescriptor;
-
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
 import org.apache.commons.configuration.Configuration;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.torque.TorqueException;
 import org.apache.torque.om.Persistent;
 import org.apache.torque.util.BasePeer;
 import org.apache.torque.util.Criteria;
-
 import org.apache.turbine.om.security.User;
 import org.apache.turbine.services.InitializationException;
 import org.apache.turbine.services.security.TurbineSecurity;
@@ -56,10 +52,10 @@ public class UserPeerManager
     private static final long serialVersionUID = 6943046259921811593L;
 
     /** The class of the Peer the TorqueSecurityService uses */
-    private static Class userPeerClass = null;
+    private static Class<?> userPeerClass = null;
 
     /** The class name of the objects returned by the configured peer. */
-    private static Class userObject = null;
+    private static Class<?> userObject = null;
 
     /** The name of the Table used for Group Object queries  */
     private static String tableName = null;
@@ -509,6 +505,7 @@ public class UserPeerManager
      * @return A String with the full name of the column.
      * @deprecated use getColumnName(String name)
      */
+    @Deprecated
     public String getFullColumnName(String name)
     {
         return getColumnName(name);
@@ -719,7 +716,7 @@ public class UserPeerManager
      *
      * @exception TorqueException A problem occured.
      */
-    public static List doSelect(Criteria criteria)
+    public static List<User> doSelect(Criteria criteria)
         throws TorqueException
     {
         List list;
@@ -738,7 +735,7 @@ public class UserPeerManager
         {
             throw new TorqueException("doSelect failed", e);
         }
-        List newList = new ArrayList(list.size());
+        List<User> newList = new ArrayList<User>(list.size());
 
         //
         // Wrap the returned Objects into TorqueUsers.
@@ -816,6 +813,7 @@ public class UserPeerManager
      *
      * @deprecated use getName(obj)
      */
+    @Deprecated
     public static String getUserName(Persistent obj)
     {
         return getName(obj);
@@ -1486,12 +1484,12 @@ public class UserPeerManager
         User u = null;
         try
         {
-            Class userWrapperClass = TurbineSecurity.getUserClass();
+            Class<? extends User> userWrapperClass = TurbineSecurity.getUserClass();
 
             Class [] clazz = new Class [] { Persistent.class };
             Object [] params = new Object [] { p };
 
-            u = (User) userWrapperClass
+            u = userWrapperClass
                 .getConstructor(clazz)
                 .newInstance(params);
         }

Modified: turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/UserPeerManagerConstants.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/UserPeerManagerConstants.java?rev=1078552&r1=1078551&r2=1078552&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/UserPeerManagerConstants.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/security/torque/UserPeerManagerConstants.java Sun Mar  6 19:58:46 2011
@@ -237,6 +237,6 @@ public interface UserPeerManagerConstant
     /** The default value of the bean property for the objectdata field. */
     String USER_OBJECTDATA_PROPERTY_DEFAULT =
         "Objectdata";
-};
+}