incubator-ftpserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r611107 - in /incubator/ftpserver/trunk/core/src: main/java/org/apache/ftpserver/ main/java/org/apache/ftpserver/command/ main/java/org/apache/ftpserver/config/ main/java/org/apache/ftpserver/filesystem/ main/java/org/apache/ftpserver/ftple...
Date Fri, 11 Jan 2008 08:49:38 GMT
Author: ngn
Date: Fri Jan 11 00:49:35 2008
New Revision: 611107

URL: http://svn.apache.org/viewvc?rev=611107&view=rev
Log:
Clean up and adding generics arguments

Modified:
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/Bean.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ComponentBean.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ConfigurableFtpServerContext.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultCommandFactory.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultFtpServerContext.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PassivePorts.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PojoBean.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/APPE.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/DELE.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/RETR.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/SITE_WHO.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/STOU.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/PropertiesConfiguration.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfiguration.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfigurationHandler.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/filesystem/NativeFileObject.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/EmptyConfiguration.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/interfaces/ServerFtpStatistics.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/iprestrictor/FileIpRestrictor.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManager.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManagerImpl.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/mina/FtpResponseEncoder.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/message/MessageResourceImpl.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ssl/DefaultSsl.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/BaseUser.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/DbUserManager.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/LdapUserManager.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/PropertiesUserManager.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/BaseProperties.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/ClassUtils.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/FtpReplyUtil.java
    incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/StringUtils.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/clienttests/FtpMd5Test.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/config/ConfigurationTestTemplate.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/FileObjectTestTemplate.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/NativeFileObjectTest.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnDefaultTest.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnSkipTest.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/LISTFileFormaterTest.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/MLSTFileFormaterTest.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/test/TestUtil.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java
    incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/util/ClassUtilsTest.java

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/Bean.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/Bean.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/Bean.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/Bean.java Fri Jan 11 00:49:35 2008
@@ -24,17 +24,18 @@
 
 public abstract class Bean {
 
-    public static Bean createBean(Configuration config, String defaultClass) throws Exception {
+    @SuppressWarnings("unchecked")
+	public static Bean createBean(Configuration config, String defaultClass) throws Exception {
         String className = config.getString("class", defaultClass);
         
-        Class clazz = Class.forName(className);
+        Class<?> clazz = Class.forName(className);
         
         boolean isComponent = Component.class.isAssignableFrom(clazz);
         
         if(isComponent) {
-            return new ComponentBean(config, clazz);
+            return new ComponentBean(config, (Class<Component>) clazz);
         } else {
-            return new PojoBean(config, clazz);
+            return new PojoBean(config, (Class<Object>) clazz);
         }
     }
     

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ComponentBean.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ComponentBean.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ComponentBean.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ComponentBean.java Fri Jan 11 00:49:35 2008
@@ -26,15 +26,15 @@
 
     private Configuration config;
     private Component component;
-    private Class clazz;
+    private Class<Component> clazz;
     
-    public ComponentBean(Configuration config, Class clazz) {
+    public ComponentBean(Configuration config, Class<Component> clazz) {
         this.clazz = clazz;
         this.config = config;
     }
     
     public Object initBean() throws Exception {
-        component = (Component) clazz.newInstance();
+        component = clazz.newInstance();
         
         component.configure(config);
         return component;

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ConfigurableFtpServerContext.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ConfigurableFtpServerContext.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ConfigurableFtpServerContext.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ConfigurableFtpServerContext.java Fri Jan 11 00:49:35 2008
@@ -70,7 +70,7 @@
     private Bean statisticsBean;
     private Bean commandFactoryBean;
     
-    private Map listeners = new HashMap();
+    private Map<String, Bean> listeners = new HashMap<String, Bean>();
     
     private static final Authority[] ADMIN_AUTHORITIES = new Authority[]{
         new WritePermission()
@@ -115,8 +115,8 @@
         }
     }
     
-    private Map createListeners(Configuration conf, String prefix) throws Exception {
-        Map map = new HashMap();
+    private Map<String, Bean> createListeners(Configuration conf, String prefix) throws Exception {
+        Map<String, Bean> map = new HashMap<String, Bean>();
 
         Configuration listenersConfig = conf.subset(prefix);
         if(listenersConfig.isEmpty()) {
@@ -126,7 +126,7 @@
             map.put("default", listenerBean);
         } else {
         
-            Iterator keys = listenersConfig.getKeys();
+            Iterator<String> keys = listenersConfig.getKeys();
             
             while (keys.hasNext()) {
                 String key = (String) keys.next();
@@ -304,9 +304,9 @@
      */
     public void dispose() {
         
-        Iterator listenerIter = listeners.values().iterator();
+        Iterator<Bean> listenerIter = listeners.values().iterator();
         while (listenerIter.hasNext()) {
-            Bean listenerBean = (Bean) listenerIter.next();
+            Bean listenerBean = listenerIter.next();
             listenerBean.destroyBean();
         }
         
@@ -340,7 +340,7 @@
     }
 
     public Listener getListener(String name) {
-        Bean listenerBean = (Bean) listeners.get(name);
+        Bean listenerBean = listeners.get(name);
         
         if(listenerBean != null) {
             return (Listener) listenerBean.getBean();
@@ -350,15 +350,15 @@
     }
 
     public Listener[] getListeners() {
-        Collection listenerBeans = listeners.values();
-        Iterator listenerIter = listenerBeans.iterator();
+        Collection<Bean> listenerBeans = listeners.values();
+        Iterator<Bean> listenerIter = listenerBeans.iterator();
         
         
         Listener[] listenerArray = new Listener[listenerBeans.size()];
         
         int counter = 0;
         while (listenerIter.hasNext()) {
-            Bean bean = (Bean) listenerIter.next();
+            Bean bean = listenerIter.next();
             
             listenerArray[counter] = (Listener) bean.getBean();
             

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultCommandFactory.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultCommandFactory.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultCommandFactory.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultCommandFactory.java Fri Jan 11 00:49:35 2008
@@ -40,12 +40,13 @@
 
     private static final  Logger LOG = LoggerFactory.getLogger(DefaultCommandFactory.class);
 
-    private HashMap commandMap = new HashMap();  
+    private HashMap<String, Command> commandMap = new HashMap<String, Command>();  
     
     /**
      * Configure the command factory - populate the command map.
      */
-    public void configure(Configuration conf) throws FtpException {
+    @SuppressWarnings("unchecked")
+	public void configure(Configuration conf) throws FtpException {
         
         // first populate the default command list
         commandMap.put("ABOR", new org.apache.ftpserver.command.ABOR());
@@ -112,8 +113,8 @@
                 throw new FtpException("Command not found :: " + cmdName);
             }
             try {
-                Class clazz = Class.forName(cmdClass);
-                Command cmd = (Command)clazz.newInstance();
+                Class<Command> clazz = (Class<Command>) Class.forName(cmdClass);
+                Command cmd = clazz.newInstance();
                 commandMap.put(cmdName, cmd);
             }
             catch(Exception ex) {
@@ -130,7 +131,7 @@
         if(cmdName == null || cmdName.equals("")) {
             return null;
         }
-        return (Command)commandMap.get(cmdName);
+        return commandMap.get(cmdName);
     }
     
     /**

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultFtpServerContext.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultFtpServerContext.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultFtpServerContext.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/DefaultFtpServerContext.java Fri Jan 11 00:49:35 2008
@@ -69,7 +69,7 @@
     private FtpStatistics statistics;
     private CommandFactory commandFactory;
     
-    private Map listeners = new HashMap();
+    private Map<String, Listener> listeners = new HashMap<String, Listener>();
     
     private static final Authority[] ADMIN_AUTHORITIES = new Authority[]{
         new WritePermission()
@@ -244,7 +244,7 @@
      */
     public void dispose() {
         
-        Iterator listenerIter = listeners.values().iterator();
+        Iterator<Listener> listenerIter = listeners.values().iterator();
         while (listenerIter.hasNext()) {
             Bean listenerBean = (Bean) listenerIter.next();
             listenerBean.destroyBean();
@@ -287,15 +287,15 @@
     }
 
     public Listener getListener(String name) {
-        return (Listener) listeners.get(name);
+        return listeners.get(name);
     }
 
     public Listener[] getListeners() {
-        Collection listenerList = listeners.values();
+        Collection<Listener> listenerList = listeners.values();
         
         Listener[] listenerArray = new Listener[0];
         
-        return (Listener[]) listenerList.toArray(listenerArray);
+        return listenerList.toArray(listenerArray);
     }
     
     public void addListener(String name, Listener listener) {
@@ -303,7 +303,7 @@
     }
 
     public Listener removeListener(String name) {
-        return (Listener) listeners.remove(name);
+        return listeners.remove(name);
     }
     
     public void setCommandFactory(CommandFactory commandFactory) {

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PassivePorts.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PassivePorts.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PassivePorts.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PassivePorts.java Fri Jan 11 00:49:35 2008
@@ -90,11 +90,11 @@
         
         int[] passivePorts = new int[passivePortsList.size()];
         
-        Iterator iter = passivePortsList.iterator();
+        Iterator<Integer> iter = passivePortsList.iterator();
         
         int counter = 0;
         while (iter.hasNext()) {
-            Integer port = (Integer) iter.next();
+            Integer port = iter.next();
             passivePorts[counter] = port.intValue();
             counter++;
         }
@@ -105,7 +105,7 @@
     /**
      * Fill a range of ports
      */
-    private static void fillRange(List passivePortsList, Integer beginPort, Integer endPort) {
+    private static void fillRange(List<Integer> passivePortsList, Integer beginPort, Integer endPort) {
         for(int i = beginPort.intValue(); i<=endPort.intValue(); i++ ) {
             Integer rangePort = new Integer(i);
             addPort(passivePortsList, rangePort);
@@ -115,7 +115,7 @@
     /**
      * Add a single port if not already in list
      */
-    private static void addPort(List passivePortsList, Integer rangePort) {
+    private static void addPort(List<Integer> passivePortsList, Integer rangePort) {
         if(!passivePortsList.contains(rangePort)) {
             passivePortsList.add(rangePort);
         }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PojoBean.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PojoBean.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PojoBean.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/PojoBean.java Fri Jan 11 00:49:35 2008
@@ -27,9 +27,9 @@
 
     private Configuration config;
     private Object pojo;
-    private Class clazz;
+    private Class<Object> clazz;
     
-    public PojoBean(Configuration config, Class clazz) {
+    public PojoBean(Configuration config, Class<Object> clazz) {
         this.clazz = clazz;
         this.config = config;
     }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/APPE.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/APPE.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/APPE.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/APPE.java Fri Jan 11 00:49:35 2008
@@ -25,11 +25,10 @@
 import java.net.SocketException;
 
 import org.apache.ftpserver.DefaultFtpReply;
-import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.IODataConnectionFactory;
+import org.apache.ftpserver.ftplet.DataConnection;
 import org.apache.ftpserver.ftplet.DataConnectionFactory;
 import org.apache.ftpserver.ftplet.FileObject;
-import org.apache.ftpserver.ftplet.DataConnection;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpReply;
 import org.apache.ftpserver.ftplet.FtpRequest;

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/DELE.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/DELE.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/DELE.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/DELE.java Fri Jan 11 00:49:35 2008
@@ -21,7 +21,6 @@
 
 import java.io.IOException;
 
-import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpReply;

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/RETR.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/RETR.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/RETR.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/RETR.java Fri Jan 11 00:49:35 2008
@@ -26,12 +26,11 @@
 import java.net.SocketException;
 
 import org.apache.ftpserver.DefaultFtpReply;
-import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.IODataConnectionFactory;
+import org.apache.ftpserver.ftplet.DataConnection;
 import org.apache.ftpserver.ftplet.DataConnectionFactory;
 import org.apache.ftpserver.ftplet.DataType;
 import org.apache.ftpserver.ftplet.FileObject;
-import org.apache.ftpserver.ftplet.DataConnection;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpReply;
 import org.apache.ftpserver.ftplet.FtpRequest;
@@ -40,7 +39,6 @@
 import org.apache.ftpserver.interfaces.FtpIoSession;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 import org.apache.ftpserver.interfaces.ServerFtpStatistics;
-import org.apache.ftpserver.listener.Connection;
 import org.apache.ftpserver.util.FtpReplyUtil;
 import org.apache.ftpserver.util.IoUtils;
 import org.slf4j.Logger;

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/SITE_WHO.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/SITE_WHO.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/SITE_WHO.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/SITE_WHO.java Fri Jan 11 00:49:35 2008
@@ -20,22 +20,22 @@
 package org.apache.ftpserver.command;
 
 import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.util.Iterator;
-import java.util.List;
+import java.util.Set;
 
 import org.apache.ftpserver.DefaultFtpReply;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpReply;
 import org.apache.ftpserver.ftplet.FtpRequest;
-import org.apache.ftpserver.ftplet.FtpSession;
 import org.apache.ftpserver.ftplet.User;
 import org.apache.ftpserver.ftplet.UserManager;
 import org.apache.ftpserver.interfaces.FtpIoSession;
 import org.apache.ftpserver.interfaces.FtpServerContext;
-import org.apache.ftpserver.listener.Connection;
 import org.apache.ftpserver.util.DateUtils;
 import org.apache.ftpserver.util.FtpReplyUtil;
 import org.apache.ftpserver.util.StringUtils;
+import org.apache.mina.common.IoSession;
 
 
 /**
@@ -64,21 +64,27 @@
         
         // print all the connected user information
         StringBuffer sb = new StringBuffer();
-        List allCons = context.getConnectionManager().getAllConnections();
+
+        Set<IoSession> sessions = session.getService().getManagedSessions();
         
         sb.append('\n');
-        for(Iterator conIt = allCons.iterator(); conIt.hasNext(); ) {
-            Connection tmpCon = (Connection)conIt.next();
-            FtpSession tmpReq = tmpCon.getSession();
-            if(!tmpReq.isLoggedIn()) {
+        Iterator<IoSession> sessionIterator = sessions.iterator();
+        
+        while(sessionIterator.hasNext()) {
+            FtpIoSession managedSession = new FtpIoSession(sessionIterator.next(), context);
+
+            if(!managedSession.isLoggedIn()) {
                 continue;
             }
             
-            User tmpUsr = tmpReq.getUser();
+            User tmpUsr = managedSession.getUser();
             sb.append( StringUtils.pad(tmpUsr.getName(), ' ', true, 16) );
-            sb.append( StringUtils.pad(tmpReq.getClientAddress().getHostAddress(), ' ', true, 16) );
-            sb.append( StringUtils.pad(DateUtils.getISO8601Date(tmpReq.getLoginTime().getTime()), ' ', true, 20) );
-            sb.append( StringUtils.pad(DateUtils.getISO8601Date(tmpReq.getLastAccessTime().getTime()), ' ', true, 20) );
+            
+            if(managedSession.getRemoteAddress() instanceof InetSocketAddress) {
+            	sb.append( StringUtils.pad(((InetSocketAddress)managedSession.getRemoteAddress()).getAddress().getHostAddress(), ' ', true, 16) );
+            }
+            sb.append( StringUtils.pad(DateUtils.getISO8601Date(managedSession.getLoginTime().getTime()), ' ', true, 20) );
+            sb.append( StringUtils.pad(DateUtils.getISO8601Date(managedSession.getLastAccessTime().getTime()), ' ', true, 20) );
             sb.append('\n');
         }
         sb.append('\n');

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/STOU.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/STOU.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/STOU.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/command/STOU.java Fri Jan 11 00:49:35 2008
@@ -26,20 +26,18 @@
 
 import org.apache.ftpserver.DefaultFtpReply;
 import org.apache.ftpserver.IODataConnectionFactory;
+import org.apache.ftpserver.ftplet.DataConnection;
 import org.apache.ftpserver.ftplet.DataConnectionFactory;
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FileSystemView;
-import org.apache.ftpserver.ftplet.DataConnection;
 import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpReply;
 import org.apache.ftpserver.ftplet.FtpRequest;
-import org.apache.ftpserver.ftplet.FtpSession;
 import org.apache.ftpserver.ftplet.Ftplet;
 import org.apache.ftpserver.ftplet.FtpletEnum;
 import org.apache.ftpserver.interfaces.FtpIoSession;
 import org.apache.ftpserver.interfaces.FtpServerContext;
 import org.apache.ftpserver.interfaces.ServerFtpStatistics;
-import org.apache.ftpserver.listener.Connection;
 import org.apache.ftpserver.util.FtpReplyUtil;
 import org.apache.ftpserver.util.IoUtils;
 import org.slf4j.Logger;

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/PropertiesConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/PropertiesConfiguration.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/PropertiesConfiguration.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/PropertiesConfiguration.java Fri Jan 11 00:49:35 2008
@@ -67,7 +67,7 @@
      */
     public boolean isEmpty() {
         boolean empty = true;
-        Enumeration keys = prop.propertyNames();
+        Enumeration<?> keys = prop.propertyNames();
         while(keys.hasMoreElements()) {
             String key = (String)keys.nextElement();
             if(key.startsWith(prefix)) {
@@ -223,9 +223,9 @@
     /**
      * Get configuration keys.
      */
-    public Iterator getKeys() {
-        ArrayList arr = new ArrayList();
-        for(Enumeration en = prop.keys(); en.hasMoreElements(); ) {
+    public Iterator<String> getKeys() {
+        ArrayList<String> arr = new ArrayList<String>();
+        for(Enumeration<Object> en = prop.keys(); en.hasMoreElements(); ) {
             String key = (String)en.nextElement();
             if(!key.startsWith(prefix)) {
                 continue;

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfiguration.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfiguration.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfiguration.java Fri Jan 11 00:49:35 2008
@@ -34,7 +34,7 @@
     
     private String name;
     private String value;
-    private ArrayList children;
+    private ArrayList<XmlConfiguration> children;
     
     /**
      * Create a new <code>XmlConfiguration</code> instance.
@@ -72,7 +72,7 @@
      */
     void addChild(XmlConfiguration elem) {
         if(children == null) {
-            children = new ArrayList();
+            children = new ArrayList<XmlConfiguration>();
         }
 
         children.add( elem );
@@ -84,8 +84,8 @@
     XmlConfiguration getChild(String param) {
         XmlConfiguration child = null;
         if(children != null) {
-            for(Iterator it=children.iterator(); it.hasNext(); ) {
-                XmlConfiguration thisChild = (XmlConfiguration)it.next();
+            for(Iterator<XmlConfiguration> it=children.iterator(); it.hasNext(); ) {
+                XmlConfiguration thisChild = it.next();
                 if( thisChild.name.equals(param) ) {
                     child = thisChild;
                     break;
@@ -248,11 +248,11 @@
     /**
      * Get the configuration keys.
      */
-    public Iterator getKeys() {
-        ArrayList arr = new ArrayList( children == null? 1 : children.size() );
+    public Iterator<String> getKeys() {
+        ArrayList<String> arr = new ArrayList<String>( children == null? 1 : children.size() );
         if(children != null) {
             for(int i=0; i<children.size(); ++i) {
-                XmlConfiguration conf = (XmlConfiguration)children.get(i); 
+                XmlConfiguration conf = children.get(i); 
                 arr.add(conf.name);
             }
         }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfigurationHandler.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfigurationHandler.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfigurationHandler.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/config/XmlConfigurationHandler.java Fri Jan 11 00:49:35 2008
@@ -38,7 +38,7 @@
 public 
 class XmlConfigurationHandler extends DefaultHandler {
 
-    private ArrayList elements = new ArrayList();
+    private ArrayList<XmlConfiguration> elements = new ArrayList<XmlConfiguration>();
     private XmlConfiguration root = null;
     private InputSource source = null;
     private StringBuffer elemVal = new StringBuffer(128);
@@ -92,7 +92,7 @@
                            String qname) throws SAXException {
         
         int location = elements.size() - 1;
-        XmlConfiguration lastElem = (XmlConfiguration)elements.remove(location);
+        XmlConfiguration lastElem = elements.remove(location);
 
         if(lastElem.getChildCount() == 0) {
             String trimmedElemVal = elemVal.toString().trim();
@@ -126,7 +126,7 @@
         elemVal.setLength(0);
 
         if(lastIdx > -1) {
-            XmlConfiguration parent = (XmlConfiguration)elements.get(lastIdx);
+            XmlConfiguration parent = elements.get(lastIdx);
             parent.setValue(null);
             parent.addChild(element);
         }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/filesystem/NativeFileObject.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/filesystem/NativeFileObject.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/filesystem/NativeFileObject.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/filesystem/NativeFileObject.java Fri Jan 11 00:49:35 2008
@@ -274,11 +274,8 @@
         }
 
         // make sure the files are returned in order
-        Arrays.sort(files, new Comparator() {
-            public int compare(Object o1, Object o2) {
-                File f1 = (File) o1;
-                File f2 = (File) o2;
-
+        Arrays.sort(files, new Comparator<File>() {
+            public int compare(File f1, File f2) {
                 return f1.getName().compareTo(f2.getName());
             }
         });

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/EmptyConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/EmptyConfiguration.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/EmptyConfiguration.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ftplet/EmptyConfiguration.java Fri Jan 11 00:49:35 2008
@@ -124,8 +124,8 @@
     /**
      * Get the keys.
      */
-    public Iterator getKeys() {
-        return new ArrayList(1).iterator();
+    public Iterator<String> getKeys() {
+        return new ArrayList<String>(1).iterator();
     }
 
 }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/interfaces/ServerFtpStatistics.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/interfaces/ServerFtpStatistics.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/interfaces/ServerFtpStatistics.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/interfaces/ServerFtpStatistics.java Fri Jan 11 00:49:35 2008
@@ -21,7 +21,6 @@
 
 import org.apache.ftpserver.ftplet.FileObject;
 import org.apache.ftpserver.ftplet.FtpStatistics;
-import org.apache.ftpserver.listener.Connection;
 
 /**
  * This is same as <code>org.apache.ftpserver.ftplet.FtpStatistics</code>

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/iprestrictor/FileIpRestrictor.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/iprestrictor/FileIpRestrictor.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/iprestrictor/FileIpRestrictor.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/iprestrictor/FileIpRestrictor.java Fri Jan 11 00:49:35 2008
@@ -86,7 +86,7 @@
      */
     public Object[][] getPermissions() throws FtpException {
         
-        ArrayList permList = new ArrayList();
+        ArrayList<Object[]> permList = new ArrayList<Object[]>();
         if(new File(file).exists()) {
             BufferedReader br = null;
             try {
@@ -121,7 +121,7 @@
         // return array
         Object[][] permissions = new Object[permList.size()][2];
         for(int i=0; i<permissions.length; ++i) {
-            permissions[i] = (Object[])permList.get(i);
+            permissions[i] = permList.get(i);
         }
         return permissions;
     }   

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManager.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManager.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManager.java Fri Jan 11 00:49:35 2008
@@ -63,7 +63,7 @@
     /**
      * Get all request handlers.
      */
-    List getAllConnections();
+    List<Connection> getAllConnections();
     
     /**
      * Establish a new connection channel.

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManagerImpl.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManagerImpl.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/ConnectionManagerImpl.java Fri Jan 11 00:49:35 2008
@@ -26,7 +26,6 @@
 import java.util.TimerTask;
 import java.util.Vector;
 
-import org.apache.ftpserver.ServerDataConnectionFactory;
 import org.apache.ftpserver.FtpSessionImpl;
 import org.apache.ftpserver.ftplet.Component;
 import org.apache.ftpserver.ftplet.Configuration;
@@ -45,7 +44,7 @@
     
     private ConnectionManagerObserver observer;              
     private Timer timer;
-    private Vector conList = new Vector();  
+    private Vector<Connection> conList = new Vector<Connection>();  
     
     private int maxConnections;
     private int maxLogins;
@@ -127,12 +126,12 @@
     /**
      * Get all request handlers
      */
-    public List getAllConnections() {
-        List cons = conList;
+    public List<Connection> getAllConnections() {
+        List<Connection> cons = conList;
         if(cons == null) {
-            return new Vector();
+            return new Vector<Connection>();
         }
-        return new Vector(cons);
+        return new Vector<Connection>(cons);
     }
     
     /**
@@ -146,7 +145,7 @@
         }
         
         // disposed - ignore
-        List cons = conList;
+        List<Connection> cons = conList;
         if(cons == null) {
             return;
         }
@@ -200,7 +199,7 @@
         }
         
         // close socket
-        List cons = conList;
+        List<Connection> cons = conList;
         if(cons != null) {
             cons.remove(connection);
         }
@@ -217,9 +216,9 @@
      * Close all connections.
      */
     public void closeAllConnections() {
-        List allCons = getAllConnections();
-        for( Iterator it = allCons.iterator(); it.hasNext(); ) {
-            Connection connection = (Connection)it.next();
+        List<Connection> allCons = getAllConnections();
+        for( Iterator<Connection> it = allCons.iterator(); it.hasNext(); ) {
+            Connection connection = it.next();
             closeConnection(connection);
         }
         allCons.clear();
@@ -232,9 +231,9 @@
     public void timerTask() {
     
         // get all connections
-        ArrayList inactiveCons = new ArrayList();
-        long currTime = System.currentTimeMillis();
-        Vector conList = this.conList;
+        ArrayList<Connection> inactiveCons = new ArrayList<Connection>();
+
+        Vector<Connection> conList = this.conList;
         if(conList == null) {
             return;
         }
@@ -242,7 +241,7 @@
         // get inactive client connection list 
         synchronized(conList) {
             for( int i = conList.size(); --i>=0; ) {
-                Connection con = (Connection)conList.get(i);
+                Connection con = conList.get(i);
                 if(con == null) {
                     continue;
                 }
@@ -276,8 +275,8 @@
         }
 
         // close idle client connections
-        for( Iterator conIt=inactiveCons.iterator(); conIt.hasNext(); ) {
-            Connection connection = (Connection)conIt.next();
+        for( Iterator<Connection> conIt=inactiveCons.iterator(); conIt.hasNext(); ) {
+            Connection connection = conIt.next();
             if(connection == null) {
                 continue;
             }
@@ -305,7 +304,7 @@
         }
         
         // close all connections
-        List cons = conList;
+        List<Connection> cons = conList;
         if (cons != null) {
             closeAllConnections();
             conList = null;

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/mina/FtpResponseEncoder.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/mina/FtpResponseEncoder.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/mina/FtpResponseEncoder.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/listener/mina/FtpResponseEncoder.java Fri Jan 11 00:49:35 2008
@@ -22,11 +22,9 @@
 import java.nio.charset.Charset;
 import java.nio.charset.CharsetEncoder;
 
-import org.apache.ftpserver.ftplet.FtpException;
 import org.apache.ftpserver.ftplet.FtpReply;
 import org.apache.mina.common.IoBuffer;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.WriteFuture;
 import org.apache.mina.filter.codec.ProtocolEncoderAdapter;
 import org.apache.mina.filter.codec.ProtocolEncoderOutput;
 import org.apache.mina.filter.codec.demux.MessageEncoder;

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/message/MessageResourceImpl.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/message/MessageResourceImpl.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/message/MessageResourceImpl.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/message/MessageResourceImpl.java Fri Jan 11 00:49:35 2008
@@ -54,7 +54,7 @@
     private final static String RESOURCE_PATH = "org/apache/ftpserver/message/";
     
     private String[] languages;
-    private HashMap messages;
+    private HashMap<String, PropertiesPair> messages;
     private String customMessageDir;
     
     private static class PropertiesPair {
@@ -82,7 +82,7 @@
         }
         
         // populate different properties
-        messages = new HashMap();
+        messages = new HashMap<String, PropertiesPair>();
         if(this.languages != null) {
             for(int i=0; i<this.languages.length; ++i) {
                 String lang = this.languages[i];
@@ -177,7 +177,7 @@
         PropertiesPair pair = null;
         if(language != null) {
             language = language.toLowerCase();
-            pair = (PropertiesPair)messages.get(language);
+            pair = messages.get(language);
             if(pair != null) {
                 value = pair.customProperties.getProperty(key);
                 if(value == null) {
@@ -188,7 +188,7 @@
         
         // if not available get the default value
         if(value == null) {
-            pair = (PropertiesPair)messages.get(null);
+            pair = messages.get(null);
             if(pair != null) {
                 value = pair.customProperties.getProperty(key);
                 if(value == null) {
@@ -208,14 +208,14 @@
         
         // load properties sequentially 
         // (default,custom,default language,custom language)
-        PropertiesPair pair = (PropertiesPair)this.messages.get(null);
+        PropertiesPair pair = this.messages.get(null);
         if(pair != null) {
             messages.putAll(pair.defaultProperties);
             messages.putAll(pair.customProperties);
         }
         if(language != null) {
             language = language.toLowerCase();
-            pair = (PropertiesPair)this.messages.get(language);
+            pair = this.messages.get(language);
             if(pair != null) {
                 messages.putAll(pair.defaultProperties);
                 messages.putAll(pair.customProperties);
@@ -264,7 +264,7 @@
         }
         
         // assign new messages
-        PropertiesPair pair = (PropertiesPair)messages.get(language);
+        PropertiesPair pair = messages.get(language);
         if(pair == null) {
             pair = new PropertiesPair();
             messages.put(language, pair);
@@ -276,10 +276,10 @@
      * Dispose component - clear all maps.
      */
     public void dispose() {
-        Iterator it = messages.keySet().iterator();
+        Iterator<String> it = messages.keySet().iterator();
         while(it.hasNext()) {
-            String language = (String)it.next();
-            PropertiesPair pair = (PropertiesPair)messages.get(language);
+            String language = it.next();
+            PropertiesPair pair = messages.get(language);
             pair.customProperties.clear();
             pair.defaultProperties.clear();
         }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ssl/DefaultSsl.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ssl/DefaultSsl.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ssl/DefaultSsl.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/ssl/DefaultSsl.java Fri Jan 11 00:49:35 2008
@@ -65,7 +65,7 @@
     private KeyManagerFactory keyManagerFactory;
     private TrustManagerFactory trustManagerFactory;
     
-    private HashMap sslContextMap;
+    private HashMap<String, SSLContext> sslContextMap;
 
     private String[] enabledCipherSuites;
     
@@ -202,7 +202,7 @@
             
             // create ssl context map - the key is the 
             // SSL protocol and the value is SSLContext.
-            sslContextMap = new HashMap();
+            sslContextMap = new HashMap<String, SSLContext>();
         }
         catch(Exception ex) {
             LOG.error("DefaultSsl.configure()", ex);
@@ -228,7 +228,7 @@
         }
         
         // if already stored - return it
-        SSLContext ctx = (SSLContext)sslContextMap.get(protocol);
+        SSLContext ctx = sslContextMap.get(protocol);
         if(ctx != null) {
             return ctx;
         }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/BaseUser.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/BaseUser.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/BaseUser.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/BaseUser.java Fri Jan 11 00:49:35 2008
@@ -194,8 +194,8 @@
         }
     }
 
-    public Authority[] getAuthorities(Class clazz) {
-        List selected = new ArrayList();
+    public Authority[] getAuthorities(Class<Authority> clazz) {
+        List<Authority> selected = new ArrayList<Authority>();
         
         for (int i = 0; i < authorities.length; i++) {
             if(authorities[i].getClass().equals(clazz)) {
@@ -203,6 +203,6 @@
             }
         }
         
-        return (Authority[]) selected.toArray(new Authority[0]);
+        return selected.toArray(new Authority[0]);
     }
 }

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/DbUserManager.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/DbUserManager.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/DbUserManager.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/DbUserManager.java Fri Jan 11 00:49:35 2008
@@ -248,7 +248,7 @@
         try {
             
             // create the sql query
-            HashMap map = new HashMap();
+            HashMap<String, Object> map = new HashMap<String, Object>();
             map.put( ATTR_LOGIN, escapeString(login) );
             String sql = StringUtils.replaceString(isAdminStmt, map);
             LOG.info(sql);
@@ -330,7 +330,7 @@
     public synchronized void delete(String name) throws FtpException {
         
         // create sql query
-        HashMap map = new HashMap();
+        HashMap<String, Object> map = new HashMap<String, Object>();
         map.put( ATTR_LOGIN, escapeString(name) );
         String sql = StringUtils.replaceString(deleteUserStmt, map);
         LOG.info(sql);
@@ -371,7 +371,7 @@
         try {
             
             // create sql query
-            HashMap map = new HashMap();
+            HashMap<String, Object> map = new HashMap<String, Object>();
             map.put( ATTR_LOGIN, escapeString(user.getName()) );
             map.put( ATTR_PASSWORD, escapeString(getPassword(user)) );
             
@@ -452,7 +452,7 @@
         try {
             
             // create sql query
-            HashMap map = new HashMap();
+            HashMap<String, Object> map = new HashMap<String, Object>();
             map.put( ATTR_LOGIN, escapeString(name) );
             String sql = StringUtils.replaceString(selectUserStmt, map);
             LOG.info(sql);
@@ -471,7 +471,7 @@
                 thisUser.setEnabled(trueStr.equalsIgnoreCase(rs.getString(ATTR_ENABLE)));
                 thisUser.setMaxIdleTime(rs.getInt(ATTR_MAX_IDLE_TIME));
                 
-                List authorities = new ArrayList();
+                List<Authority> authorities = new ArrayList<Authority>();
                 if(trueStr.equalsIgnoreCase(rs.getString(ATTR_WRITE_PERM))) {
                     authorities.add(new WritePermission());
                 }
@@ -479,7 +479,7 @@
                 authorities.add(new ConcurrentLoginPermission(rs.getInt(ATTR_MAX_LOGIN_NUMBER), rs.getInt(ATTR_MAX_LOGIN_PER_IP)));
                 authorities.add(new TransferRatePermission(rs.getInt(ATTR_MAX_DOWNLOAD_RATE), rs.getInt(ATTR_MAX_UPLOAD_RATE)));
                 
-                thisUser.setAuthorities((Authority[]) authorities.toArray(new Authority[0]));
+                thisUser.setAuthorities(authorities.toArray(new Authority[0]));
             }
             return thisUser;
         }
@@ -516,7 +516,7 @@
         try {
             
             // create the sql
-            HashMap map = new HashMap();
+            HashMap<String, Object> map = new HashMap<String, Object>();
             map.put( ATTR_LOGIN, escapeString(name) );
             String sql = StringUtils.replaceString(selectUserStmt, map);
             LOG.info(sql);
@@ -568,11 +568,11 @@
             rs = stmt.executeQuery(sql);
             
             // populate list
-            ArrayList names = new ArrayList();
+            ArrayList<String> names = new ArrayList<String>();
             while(rs.next()) {
                 names.add(rs.getString(ATTR_LOGIN));
             }
-            return (String[]) names.toArray(new String[0]);
+            return names.toArray(new String[0]);
         }
         catch(SQLException ex) {
             LOG.error("DbUserManager.getAllUserNames()", ex);
@@ -618,7 +618,7 @@
         }
 
         // create sql query
-        HashMap map = new HashMap();
+        HashMap<String, Object> map = new HashMap<String, Object>();
         map.put( ATTR_LOGIN, escapeString(user.getName()) );
         String sql = StringUtils.replaceString(selectUserStmt, map);
         LOG.info(sql);
@@ -681,7 +681,7 @@
             try {
                 
                 // create the sql query
-                HashMap map = new HashMap();
+                HashMap<String, Object> map = new HashMap<String, Object>();
                 map.put( ATTR_LOGIN, escapeString(user) );
                 map.put( ATTR_PASSWORD, escapeString(password) );
                 String sql = StringUtils.replaceString(authenticateStmt, map);

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/LdapUserManager.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/LdapUserManager.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/LdapUserManager.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/LdapUserManager.java Fri Jan 11 00:49:35 2008
@@ -135,18 +135,18 @@
             Attributes matchAttrs = new BasicAttributes(true);
             matchAttrs.put(objClassAttr);
             matchAttrs.put( new BasicAttribute(CLASS_NAME, BaseUser.class.getName()) );
-            NamingEnumeration answers = adminContext.search(userBaseDn, matchAttrs, CN_ATTRS);
+            NamingEnumeration<SearchResult> answers = adminContext.search(userBaseDn, matchAttrs, CN_ATTRS);
             LOG.info("Getting all users under " + userBaseDn);
             
             // populate list
-            ArrayList allUsers = new ArrayList();
+            ArrayList<String> allUsers = new ArrayList<String>();
             while (answers.hasMore()) {
                 SearchResult sr = (SearchResult)answers.next();
                 String cn = sr.getAttributes().get(CN).get().toString();
                 allUsers.add(cn);
             }
             Collections.sort(allUsers);
-            return (String[]) allUsers.toArray(new String[0]);
+            return allUsers.toArray(new String[0]);
         }
         catch(NamingException ex) {
             LOG.error("LdapUserManager.getAllUserNames()", ex);

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/PropertiesUserManager.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/PropertiesUserManager.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/PropertiesUserManager.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/usermanager/PropertiesUserManager.java Fri Jan 11 00:49:35 2008
@@ -133,7 +133,7 @@
     }
     
     private void convertDeprecatedPropertyNames() {
-        Enumeration keys = userDataProp.propertyNames();
+        Enumeration<?> keys = userDataProp.propertyNames();
         
         boolean doSave = false;
         
@@ -239,15 +239,15 @@
         
         // remove entries from properties
         String thisPrefix = PREFIX + usrName + '.';
-        Enumeration propNames = userDataProp.propertyNames();
-        ArrayList remKeys = new ArrayList();
+        Enumeration<?> propNames = userDataProp.propertyNames();
+        ArrayList<String> remKeys = new ArrayList<String>();
         while(propNames.hasMoreElements()) {
             String thisKey = propNames.nextElement().toString();
             if(thisKey.startsWith(thisPrefix)) {
                 remKeys.add(thisKey);
             }
         }
-        Iterator remKeysIt = remKeys.iterator();
+        Iterator<String> remKeysIt = remKeys.iterator();
         while (remKeysIt.hasNext()) {
             userDataProp.remove(remKeysIt.next().toString());
         }
@@ -300,8 +300,8 @@
 
         // get all user names
         String suffix = '.' + ATTR_HOME;
-        ArrayList ulst = new ArrayList();
-        Enumeration allKeys = userDataProp.propertyNames();
+        ArrayList<String> ulst = new ArrayList<String>();
+        Enumeration<?> allKeys = userDataProp.propertyNames();
         int prefixlen = PREFIX.length();
         int suffixlen = suffix.length();
         while(allKeys.hasMoreElements()) {
@@ -315,7 +315,7 @@
         }
         
         Collections.sort(ulst);
-        return (String[]) ulst.toArray(new String[0]);
+        return ulst.toArray(new String[0]);
     }
 
     /**
@@ -333,7 +333,7 @@
         user.setEnabled(userDataProp.getBoolean(baseKey + ATTR_ENABLE, true));
         user.setHomeDirectory( userDataProp.getProperty(baseKey + ATTR_HOME, "/") );
         
-        List authorities = new ArrayList();
+        List<Authority> authorities = new ArrayList<Authority>();
         
         if(userDataProp.getBoolean(baseKey + ATTR_WRITE_PERM, false)) {
             authorities.add(new WritePermission());
@@ -349,7 +349,7 @@
         
         authorities.add(new TransferRatePermission(downloadRate, uploadRate));
         
-        user.setAuthorities((Authority[]) authorities.toArray(new Authority[0]));
+        user.setAuthorities(authorities.toArray(new Authority[0]));
         
         user.setMaxIdleTime(userDataProp.getInteger(baseKey + ATTR_MAX_IDLE_TIME, 0));
 

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/BaseProperties.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/BaseProperties.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/BaseProperties.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/BaseProperties.java Fri Jan 11 00:49:35 2008
@@ -251,7 +251,7 @@
     /**
      * Get <code>Class</code> object
      */
-    public Class getClass(final String str) throws FtpException  {
+    public Class<?> getClass(final String str) throws FtpException  {
         String value = getProperty(str);
         if (value == null) {
             throw new FtpException(str + " not found");
@@ -265,7 +265,7 @@
         }
     }
 
-    public Class getClass(final String str, final Class cls)  {
+    public Class<?> getClass(final String str, final Class<?> cls)  {
         try {
             return getClass(str);
         } 
@@ -423,7 +423,7 @@
     /**
      * Set <code>Class</code> object.
      */
-    public void setProperty(final String key, final Class val)  {
+    public void setProperty(final String key, final Class<?> val)  {
         setProperty(key, val.getName());
     }
 

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/ClassUtils.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/ClassUtils.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/ClassUtils.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/ClassUtils.java Fri Jan 11 00:49:35 2008
@@ -115,7 +115,7 @@
         
     }
     
-    private static PropertyDescriptor getDescriptor(Class clazz, String propertyName) {
+    private static PropertyDescriptor getDescriptor(Class<?> clazz, String propertyName) {
         propertyName = normalizePropertyName(propertyName);
         
         BeanInfo beanInfo;
@@ -136,7 +136,7 @@
         return null;
     }
         
-    private static Object createObject(Class clazz, Configuration config, String propValue) {
+    private static Object createObject(Class<?> clazz, Configuration config, String propValue) {
         Object value;
         
         if(config.isEmpty()) {
@@ -158,12 +158,12 @@
             }
             
             if(Map.class.isAssignableFrom(clazz)) {
-                Map map = new HashMap();
+                Map<String, Object> map = new HashMap<String, Object>();
                 
-                Iterator mapKeys = getKeysInOrder(config.getKeys());
+                Iterator<String> mapKeys = getKeysInOrder(config.getKeys());
                 
                 while (mapKeys.hasNext()) {
-                    String mapKey = (String) mapKeys.next();
+                    String mapKey = mapKeys.next();
                     String mapValue = config.getString(mapKey, null);
                     Configuration mapConfig = config.subset(mapKey);
                     
@@ -172,12 +172,12 @@
                 
                 value = map;
             } else if(Collection.class.isAssignableFrom(clazz)) {
-                List list = new ArrayList();
+                List<Object> list = new ArrayList<Object>();
                 
-                Iterator mapKeys = getKeysInOrder(config.getKeys());
+                Iterator<String> mapKeys = getKeysInOrder(config.getKeys());
                 
                 while (mapKeys.hasNext()) {
-                    String mapKey = (String) mapKeys.next();
+                    String mapKey = mapKeys.next();
                     
                     String listValue = config.getString(mapKey, null);
 
@@ -186,12 +186,12 @@
                 
                 value = list;
             } else if(clazz.isArray()) {
-                List list = new ArrayList();
+                List<Object> list = new ArrayList<Object>();
                 
-                Iterator mapKeys = getKeysInOrder(config.getKeys());
+                Iterator<String> mapKeys = getKeysInOrder(config.getKeys());
                 
                 while (mapKeys.hasNext()) {
-                    String mapKey = (String) mapKeys.next();
+                    String mapKey = mapKeys.next();
                     
                     String listValue = config.getString(mapKey, null);
 
@@ -217,10 +217,8 @@
         return value;
     }
     
-    public static class KeyComparator implements Comparator {
-        public int compare(Object o1, Object o2) {
-            String key1 = (String) o1;
-            String key2 = (String) o2;
+    public static class KeyComparator implements Comparator<String> {
+        public int compare(String key1, String key2) {
 
             // assume they are integers
             try {
@@ -234,11 +232,11 @@
         }
     }
     
-    private static Iterator getKeysInOrder(Iterator keys) {
-        List keyList = new ArrayList();
+    private static Iterator<String> getKeysInOrder(Iterator<String> keys) {
+        List<String> keyList = new ArrayList<String>();
         
         while (keys.hasNext()) {
-            String key = (String) keys.next();
+            String key = keys.next();
             keyList.add(key);
         }
         
@@ -247,15 +245,15 @@
         return keyList.iterator();
     }
     
-    public static Map createMap(Configuration config) {
-        return (Map) createObject(Map.class, config, null);
+    public static Map<?, ?> createMap(Configuration config) {
+        return (Map<?, ?>) createObject(Map.class, config, null);
         
     }
     
     public static Object createBean(Configuration config, String defaultClass) {
         String className = config.getString("class", defaultClass);
         
-        Class clazz;
+        Class<?> clazz;
         Object bean;
         try {
             clazz = Class.forName(className);
@@ -265,10 +263,10 @@
         }
         
         
-        Iterator keys = config.getKeys();
+        Iterator<String> keys = config.getKeys();
         
         while (keys.hasNext()) {
-            String key = (String) keys.next();
+            String key = keys.next();
 
             if(key.equals("class")) {
                 continue;
@@ -302,7 +300,7 @@
         }
     }
     
-    public static Object cast(Class clazz, String value) {
+    public static Object cast(Class<?> clazz, String value) {
         
         Object castValue = null;
         int pos;
@@ -341,7 +339,7 @@
             
             castValue = castArray;
         } else if(clazz == List.class) {
-            List list = new ArrayList();
+            List<String> list = new ArrayList<String>();
             String[] values = value.split(",");
             
             for (int i = 0; i < values.length; i++) {
@@ -365,7 +363,7 @@
             }
         } else if((pos = value.lastIndexOf('.')) != -1) {
             try {
-                Class c = Class.forName(value.substring(0, pos));
+                Class<?> c = Class.forName(value.substring(0, pos));
                 Field f = c.getDeclaredField(value.substring(pos+1));
 
                 castValue = f.get(null);
@@ -388,8 +386,8 @@
      * @param className The class name to look for in the super classes
      * @return true if the class extends a class by the specified name.
      */
-    public static boolean extendsClass(final Class clazz, String className) {
-    	Class superClass = clazz.getSuperclass();
+    public static boolean extendsClass(final Class<?> clazz, String className) {
+    	Class<?> superClass = clazz.getSuperclass();
     	
     	while(superClass != null) {
     		if(superClass.getName().equals(className)) {

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/FtpReplyUtil.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/FtpReplyUtil.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/FtpReplyUtil.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/FtpReplyUtil.java Fri Jan 11 00:49:35 2008
@@ -30,7 +30,6 @@
 import org.apache.ftpserver.ftplet.FtpStatistics;
 import org.apache.ftpserver.interfaces.FtpIoSession;
 import org.apache.ftpserver.interfaces.FtpServerContext;
-import org.apache.ftpserver.interfaces.FtpServerSession;
 import org.apache.ftpserver.interfaces.MessageResource;
 
 /**

Modified: incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/StringUtils.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/StringUtils.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/StringUtils.java (original)
+++ incubator/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/util/StringUtils.java Fri Jan 11 00:49:35 2008
@@ -89,7 +89,7 @@
     /**
      * Replace string.
      */ 
-    public final static String replaceString(String source, Map args) {
+    public final static String replaceString(String source, Map<String, Object> args) {
         int startIndex = 0;
         int openIndex = source.indexOf('{', startIndex);
         if (openIndex == -1) {

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/clienttests/FtpMd5Test.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/clienttests/FtpMd5Test.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/clienttests/FtpMd5Test.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/clienttests/FtpMd5Test.java Fri Jan 11 00:49:35 2008
@@ -122,7 +122,7 @@
     }
 
     private void assertHash(String expected, String reply, String fileName) {
-        Map hashes = parseReplyHash(reply);
+        Map<String, String> hashes = parseReplyHash(reply);
         assertEquals(expected, hashes.get(fileName));
     }
     
@@ -165,13 +165,13 @@
         assertEquals(504, client.sendCommand("MMD5 " + fileNames));
     }
     
-    private Map parseReplyHash(String reply) {
+    private Map<String, String> parseReplyHash(String reply) {
         String s = reply.substring(4);
         s = s.trim();
         
         String[] tokens = s.split(",");
         
-        Map result = new HashMap();
+        Map<String, String> result = new HashMap<String, String>();
         for (int i = 0; i < tokens.length; i++) {
             String token = tokens[i].trim();
             int hashStart = token.lastIndexOf(' ');

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/config/ConfigurationTestTemplate.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/config/ConfigurationTestTemplate.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/config/ConfigurationTestTemplate.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/config/ConfigurationTestTemplate.java Fri Jan 11 00:49:35 2008
@@ -40,7 +40,7 @@
     }
 
     public void testBaseConfigKeys() throws Exception {
-        Iterator keys = config.getKeys();
+        Iterator<String> keys = config.getKeys();
         
         assertEquals("socket-factory", keys.next());
         assertEquals("empty", keys.next());

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/FileObjectTestTemplate.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/FileObjectTestTemplate.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/FileObjectTestTemplate.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/FileObjectTestTemplate.java Fri Jan 11 00:49:35 2008
@@ -17,7 +17,9 @@
     protected static final String FILE3_PATH = "/file3";
     
     protected static final User USER = new BaseUser() {
-        public AuthorizationRequest authorize(AuthorizationRequest request) {
+		private static final long serialVersionUID = 4906315989316879758L;
+
+		public AuthorizationRequest authorize(AuthorizationRequest request) {
             return request;
         }
     };

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/NativeFileObjectTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/NativeFileObjectTest.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/NativeFileObjectTest.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/filesystem/NativeFileObjectTest.java Fri Jan 11 00:49:35 2008
@@ -37,7 +37,7 @@
     private static final File TEST_FILE2_IN_DIR1 = new File(TEST_DIR1, "file2");
     private static final File TEST_FILE3 = new File(ROOT_DIR, "file3");
 
-    private static final Map FILE_MAPPINGS = new HashMap();
+    private static final Map<String, File> FILE_MAPPINGS = new HashMap<String, File>();
     
     static {
         FILE_MAPPINGS.put("/", ROOT_DIR);
@@ -69,7 +69,7 @@
     
 
     protected FileObject createFileObject(String fileName, User user) {
-        return new NativeFileObject(fileName, (File)FILE_MAPPINGS.get(fileName), user);
+        return new NativeFileObject(fileName, FILE_MAPPINGS.get(fileName), user);
     }
 
     public void testGetPhysicalName() {

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnDefaultTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnDefaultTest.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnDefaultTest.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnDefaultTest.java Fri Jan 11 00:49:35 2008
@@ -43,7 +43,7 @@
      */
     protected void setUp() throws Exception {
         MockFtplet.callback = new MockFtpletCallback();
-        MockFtplet.callback.returnValue = FtpletEnum.RET_DEFAULT;
+        MockFtpletCallback.returnValue = FtpletEnum.RET_DEFAULT;
 
         initDirs();
 
@@ -76,7 +76,7 @@
             }
             
         };
-        MockFtplet.callback.returnValue = FtpletEnum.RET_DEFAULT;
+        MockFtpletCallback.returnValue = FtpletEnum.RET_DEFAULT;
         
         assertTrue(client.login(ADMIN_USERNAME, ADMIN_PASSWORD));
     }

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnSkipTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnSkipTest.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnSkipTest.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/ftplet/FtpLetReturnSkipTest.java Fri Jan 11 00:49:35 2008
@@ -19,18 +19,12 @@
 
 package org.apache.ftpserver.ftplet;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.Properties;
 
 import org.apache.ftpserver.clienttests.ClientTestTemplate;
 
 public class FtpLetReturnSkipTest extends ClientTestTemplate {
-    private static final byte[] TESTDATA = "TESTDATA".getBytes();
-    private static final byte[] DOUBLE_TESTDATA = "TESTDATATESTDATA".getBytes();
-    private static final File TEST_FILE1 = new File(ROOT_DIR, "test1.txt");
-    private static final File TEST_FILE2 = new File(ROOT_DIR, "test2.txt");
-    private static final File TEST_DIR1 = new File(ROOT_DIR, "dir1");
     
     protected FtpletEnum mockReturnValue = FtpletEnum.RET_DISCONNECT;
     

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/interfaces/ServerFtpStatisticsTestTemplate.java Fri Jan 11 00:49:35 2008
@@ -99,7 +99,8 @@
         assertEquals(0, stats.getCurrentConnectionNumber());
     }
     
-    public void testStartDateImmutable() {
+    @SuppressWarnings("deprecation")
+	public void testStartDateImmutable() {
         ServerFtpStatistics stats = createStatistics();
         Date date = stats.getStartTime();
         date.setYear(1);

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/LISTFileFormaterTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/LISTFileFormaterTest.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/LISTFileFormaterTest.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/LISTFileFormaterTest.java Fri Jan 11 00:49:35 2008
@@ -28,6 +28,7 @@
 
 import org.apache.ftpserver.ftplet.FileObject;
 
+@SuppressWarnings("deprecation")
 public class LISTFileFormaterTest extends TestCase {
 
     private static final Date LAST_MODIFIED_IN_2005 = new Date(105, 1, 2, 3, 4);

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/MLSTFileFormaterTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/MLSTFileFormaterTest.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/MLSTFileFormaterTest.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/listing/MLSTFileFormaterTest.java Fri Jan 11 00:49:35 2008
@@ -28,6 +28,7 @@
 
 import org.apache.ftpserver.ftplet.FileObject;
 
+@SuppressWarnings("deprecation")
 public class MLSTFileFormaterTest extends TestCase {
 
     private static final Date LAST_MODIFIED_IN_2005 = new Date(105, 1, 2, 3, 4);

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/test/TestUtil.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/test/TestUtil.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/test/TestUtil.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/test/TestUtil.java Fri Jan 11 00:49:35 2008
@@ -96,12 +96,12 @@
     }
 
     public static String[] getHostAddresses() throws Exception {
-        Enumeration nifs = NetworkInterface.getNetworkInterfaces();
+        Enumeration<NetworkInterface> nifs = NetworkInterface.getNetworkInterfaces();
         
-        List hostIps = new ArrayList();
+        List<String> hostIps = new ArrayList<String>();
         while (nifs.hasMoreElements()) {
             NetworkInterface nif = (NetworkInterface) nifs.nextElement();
-            Enumeration ips = nif.getInetAddresses();
+            Enumeration<InetAddress> ips = nif.getInetAddresses();
             
             while (ips.hasMoreElements()) {
                 InetAddress ip = (InetAddress) ips.nextElement();
@@ -113,7 +113,7 @@
             }
         }
         
-        return (String[]) hostIps.toArray(new String[0]);
+        return hostIps.toArray(new String[0]);
     }
     
     public static void writeDataToFile(File file, byte[] data) throws IOException {

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java Fri Jan 11 00:49:35 2008
@@ -211,11 +211,11 @@
         user.setEnabled(false);
         user.setMaxIdleTime(2);
 
-        List authorities = new ArrayList();
+        List<Authority> authorities = new ArrayList<Authority>();
         authorities.add(new WritePermission());
         authorities.add(new ConcurrentLoginPermission(3, 4));
         authorities.add(new TransferRatePermission(1, 5));
-        user.setAuthorities((Authority[]) authorities.toArray(new Authority[0]));
+        user.setAuthorities(authorities.toArray(new Authority[0]));
 
         userManager.save(user);
         

Modified: incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/util/ClassUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/util/ClassUtilsTest.java?rev=611107&r1=611106&r2=611107&view=diff
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/util/ClassUtilsTest.java (original)
+++ incubator/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/util/ClassUtilsTest.java Fri Jan 11 00:49:35 2008
@@ -152,7 +152,7 @@
         
         MyCollectionBean bean = (MyCollectionBean) ClassUtils.createBean(config, null);
         
-        Iterator iter = bean.getList().iterator();
+        Iterator<?> iter = bean.getList().iterator();
         
         assertEquals("foo", iter.next());
         assertEquals("bar", iter.next());
@@ -175,7 +175,7 @@
         
         MyCollectionBean bean = (MyCollectionBean) ClassUtils.createBean(config, null);
         
-        Iterator iter = bean.getList().iterator();
+        Iterator<?> iter = bean.getList().iterator();
         
         MyBean myBean1 = (MyBean) iter.next();
         assertEquals("foo1", myBean1.getFoo());
@@ -275,7 +275,7 @@
         
         MyMapBean bean = (MyMapBean) ClassUtils.createBean(config, null);
         
-        Map map = bean.getMap();
+        Map<?, ?> map = bean.getMap();
         
         assertEquals(4, map.size());
         assertEquals("bar1", map.get("foo1"));
@@ -297,7 +297,7 @@
         
         Configuration config = new PropertiesConfiguration(props);
         
-        Map map = ClassUtils.createMap(config);
+        Map<?, ?> map = ClassUtils.createMap(config);
         
         for(int i = 1; i<5; i++) {
             MyBean bean = (MyBean) map.get("foo" + i);
@@ -307,7 +307,7 @@
     }
  
     public static class MyCollectionBean {
-        private List list;
+        private List<?> list;
         private int[] array;
         private MyBean[] myBeans;
 
@@ -323,22 +323,22 @@
         public void setArray(int[] array) {
             this.array = array;
         }
-        public List getList() {
+        public List<?> getList() {
             return list;
         }
-        public void setList(List list) {
+        public void setList(List<?> list) {
             this.list = list;
         }
     }
     
     public static class MyMapBean {
-        private Map map;
+        private Map<?, ?> map;
 
-        public Map getMap() {
+        public Map<?, ?> getMap() {
             return map;
         }
 
-        public void setMap(Map map) {
+        public void setMap(Map<?, ?> map) {
             this.map = map;
         }
 



Mime
View raw message