Author: sebb
Date: Thu Mar 13 12:55:01 2008
New Revision: 636854

URL: http://svn.apache.org/viewvc?rev=636854&view=rev
Log:
Parameterise raw types

Modified:
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParser.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/Threader.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeInfo.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeStamp.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3Client.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/smtp/RelayPath.java
    
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java
    
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/ListingFunctionalTest.java
    
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java
 Thu Mar 13 12:55:01 2008
@@ -558,7 +558,7 @@
         * @return a Collection of all the language codes currently supported
         * by this class
         */
-       public static Collection getSupportedLanguageCodes() {
+       public static Collection<String> getSupportedLanguageCodes() {
            return LANGUAGE_CODE_MAP.keySet();
        }
        

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParser.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParser.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParser.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParser.java
 Thu Mar 13 12:55:01 2008
@@ -137,7 +137,7 @@
      *
      * @return Original list as processed by this method.
      */
-    List preParse(List<String> original);
+    List<String> preParse(List<String> original);
 
 
 }

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
 Thu Mar 13 12:55:01 2008
@@ -64,10 +64,10 @@
      *
      * @return <code>original</code> unmodified.
      */
-     public List preParse(List<String> original) {
-         Iterator it = original.iterator();
+     public List<String> preParse(List<String> original) {
+         Iterator<String> it = original.iterator();
          while (it.hasNext()){
-            String entry = (String) it.next();
+            String entry = it.next();
             if (null == parseFTPEntry(entry)) {
                 it.remove();
             } else {

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPListParseEngine.java
 Thu Mar 13 12:55:01 2008
@@ -74,7 +74,7 @@
  */
 public class FTPListParseEngine {
     private List<String> entries = new LinkedList<String>();
-    private ListIterator _internalIterator = entries.listIterator();
+    private ListIterator<String> _internalIterator = entries.listIterator();
 
     FTPFileEntryParser parser = null;
 
@@ -186,7 +186,7 @@
         List<FTPFile> tmpResults = new LinkedList<FTPFile>();
         int count = quantityRequested;
         while (count > 0 && this._internalIterator.hasNext()) {
-            String entry = (String) this._internalIterator.next();
+            String entry = this._internalIterator.next();
             FTPFile temp = this.parser.parseFTPEntry(entry);
             tmpResults.add(temp);
             count--;
@@ -225,7 +225,7 @@
         List<FTPFile> tmpResults = new LinkedList<FTPFile>();
         int count = quantityRequested;
         while (count > 0 && this._internalIterator.hasPrevious()) {
-            String entry = (String) this._internalIterator.previous();
+            String entry = this._internalIterator.previous();
             FTPFile temp = this.parser.parseFTPEntry(entry);
             tmpResults.add(0,temp);
             count--;
@@ -249,9 +249,9 @@
     throws IOException
     {
         List<FTPFile> tmpResults = new LinkedList<FTPFile>();
-        Iterator iter = this.entries.iterator();
+        Iterator<String> iter = this.entries.iterator();
         while (iter.hasNext()) {
-            String entry = (String) iter.next();
+            String entry = iter.next();
             FTPFile temp = this.parser.parseFTPEntry(entry);
             tmpResults.add(temp);
         }

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
 Thu Mar 13 12:55:01 2008
@@ -81,7 +81,7 @@
        if (key == null)
                throw new ParserInitializationException("Parser key cannot be 
null");
                
-        Class parserClass = null;
+        Class<?> parserClass = null;
         FTPFileEntryParser parser = null;
         try
         {

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java
 Thu Mar 13 12:55:01 2008
@@ -273,9 +273,9 @@
         * a tape archive. These entries is currently not supported by this 
parser.
         * A null value is returned.
         * 
-        * @param f:
+        * @param file
         *            will be updated with Name, Type, Timestamp if parsed.
-        * @param zosDirectoryEntry
+        * @param entry zosDirectoryEntry
         * @return true: entry was parsed, false: entry was not parsed.
         */
        private boolean parseFileList(FTPFile file, String entry) {
@@ -317,9 +317,9 @@
         * last update
         * 
         * 
-        * @param f:
+        * @param file
         *            will be updated with Name, Type and Timestamp if parsed.
-        * @param zosDirectoryEntry
+        * @param entry zosDirectoryEntry
         * @return true: entry was parsed, false: entry was not parsed.
         */
        private boolean parseMemberList(FTPFile file, String entry) {
@@ -386,9 +386,9 @@
         * files [5] The string "Spool Files"
         * 
         * 
-        * @param f:
+        * @param file
         *            will be updated with Name, Type and Timestamp if parsed.
-        * @param zosDirectoryEntry
+        * @param entry zosDirectoryEntry
         * @return true: entry was parsed, false: entry was not parsed.
         */
        private boolean parseJeslevel1List(FTPFile file, String entry) {
@@ -415,9 +415,9 @@
         * Class [6] The rest
         * 
         * 
-        * @param f:
+        * @param file
         *            will be updated with Name, Type and Timestamp if parsed.
-        * @param zosDirectoryEntry
+        * @param entry zosDirectoryEntry
         * @return true: entry was parsed, false: entry was not parsed.
         */
        private boolean parseJeslevel2List(FTPFile file, String entry) {
@@ -440,12 +440,12 @@
         * z/OS-MVS File lists z/OS-MVS Member lists unix file lists
         */
        @Override
-       public List preParse(List orig) {
+       public List<String> preParse(List<String> orig) {
                // simply remove the header line. Composite logic will take 
care of the
                // two different types of
                // list in short order.
                if (orig != null && orig.size() > 0) {
-                       String header = (String) orig.get(0);
+                       String header = orig.get(0);
                        if (header.indexOf("Volume") >= 0 && 
header.indexOf("Dsname") >= 0) {
                                setType(FILE_LIST_TYPE);
                                super.setRegex(FILE_LIST_REGEX);

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java
 Thu Mar 13 12:55:01 2008
@@ -117,12 +117,12 @@
      * @return Original list purged of duplicates
      */
     @Override
-    public List preParse(List<String> original) {
+    public List<String> preParse(List<String> original) {
         original = super.preParse(original);
         HashMap<String, NameVersion> existingEntries = new HashMap<String, 
NameVersion>();
-        ListIterator iter = original.listIterator();
+        ListIterator<String> iter = original.listIterator();
         while (iter.hasNext()) {
-            String entry = ((String)iter.next()).trim();
+            String entry = iter.next().trim();
             MatchResult result = null;
             _preparse_matcher_ = _preparse_pattern_.matcher(entry);
             if (_preparse_matcher_.matches()) {
@@ -146,7 +146,7 @@
         // we now must remove those with smaller than the largest version 
number
         // for each name that were found before the largest
         while (iter.hasPrevious()) {
-            String entry = ((String)iter.previous()).trim();
+            String entry = iter.previous().trim();
             MatchResult result = null;
             _preparse_matcher_ = _preparse_pattern_.matcher(entry);
             if (_preparse_matcher_.matches()) {

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/NNTPClient.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/NNTPClient.java
 Thu Mar 13 12:55:01 2008
@@ -237,14 +237,14 @@
     {
         int size;
         String line;
-        Vector list;
+        Vector<NewsgroupInfo> list;
         BufferedReader reader;
         NewsgroupInfo tmp, info[];
 
         reader = new BufferedReader(new DotTerminatedMessageReader(_reader_));
         // Start of with a big vector because we may be reading a very large
         // amount of groups.
-        list = new Vector(2048);
+        list = new Vector<NewsgroupInfo>(2048);
 
         while ((line = reader.readLine()) != null)
         {
@@ -1009,7 +1009,7 @@
     {
         int size;
         String line;
-        Vector list;
+        Vector<String> list;
         String[] result;
         BufferedReader reader;
 
@@ -1018,7 +1018,7 @@
                                                 query.isGMT(), 
query.getDistributions())))
             return null;
 
-        list = new Vector();
+        list = new Vector<String>();
         reader = new BufferedReader(new DotTerminatedMessageReader(_reader_));
 
         while ((line = reader.readLine()) != null)

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/Threader.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/Threader.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/Threader.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/nntp/Threader.java
 Thu Mar 13 12:55:01 2008
@@ -32,7 +32,7 @@
 
 public class Threader {
        private ThreadContainer root;
-       private HashMap idTable;
+       private HashMap<String,ThreadContainer> idTable;
        private int bogusIdCount = 0;
 
        /**
@@ -45,7 +45,7 @@
                if (messages == null)
                        return null;
 
-               idTable = new HashMap();
+               idTable = new HashMap<String,ThreadContainer>();
 
                // walk through each Threadable element
                for (int i = 0; i < messages.length; ++i) {
@@ -83,7 +83,7 @@
         */
        private void buildContainer(Threadable threadable) {
                String id = threadable.messageThreadId();
-               ThreadContainer container = (ThreadContainer) idTable.get(id);
+               ThreadContainer container = idTable.get(id);
 
                // A ThreadContainer exists for this id already. This should be 
a forward reference, but may 
                // be a duplicate id, in which case we will need to generate a 
bogus placeholder id
@@ -112,7 +112,7 @@
                        String[] references = 
threadable.messageThreadReferences();
                        for (int i = 0; i < references.length; ++i) {
                                String refString = references[i];
-                               ThreadContainer ref = (ThreadContainer) 
idTable.get(refString);
+                               ThreadContainer ref = idTable.get(refString);
 
                                // if this id doesnt have a container, create 
one
                                if (ref == null) {
@@ -187,11 +187,11 @@
         */
        private ThreadContainer findRootSet() {
                ThreadContainer root = new ThreadContainer();
-               Iterator iter = idTable.keySet().iterator();
+               Iterator<String> iter = idTable.keySet().iterator();
 
                while (iter.hasNext()) {
                        Object key = iter.next();
-                       ThreadContainer c = (ThreadContainer) idTable.get(key);
+                       ThreadContainer c = idTable.get(key);
                        if (c.parent == null) {
                                if (c.next != null)
                                        throw new RuntimeException(
@@ -275,7 +275,7 @@
                        count++;
 
                // TODO verify this will avoid rehashing
-               HashMap subjectTable = new HashMap((int) (count * 1.2), (float) 
0.9);
+               HashMap<String, ThreadContainer> subjectTable = new 
HashMap<String, ThreadContainer>((int) (count * 1.2), (float) 0.9);
                count = 0;
 
                for (ThreadContainer c = root.child; c != null; c = c.next) {
@@ -292,7 +292,7 @@
                        if (subj == null || subj == "")
                                continue;
 
-                       ThreadContainer old = (ThreadContainer) 
subjectTable.get(subj);
+                       ThreadContainer old = subjectTable.get(subj);
 
                        // Add this container to the table iff:
                        // - There exists no container with this subject
@@ -334,7 +334,7 @@
                        if (subj == null || subj == "")
                                continue;
 
-                       ThreadContainer old = (ThreadContainer) 
subjectTable.get(subj);
+                       ThreadContainer old = subjectTable.get(subj);
 
                        if (old == c) // That's us
                                continue;

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeInfo.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeInfo.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeInfo.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeInfo.java
 Thu Mar 13 12:55:01 2008
@@ -64,7 +64,7 @@
      * @param comments List of errors/warnings identified during processing
      * @throws IllegalArgumentException if message is null
      */
-    public TimeInfo(NtpV3Packet message, long returnTime, List comments)
+    public TimeInfo(NtpV3Packet message, long returnTime, List<String> 
comments)
     {
             this(message, returnTime, comments, true);
     }
@@ -97,7 +97,7 @@
      * @param doComputeDetails  flag to pre-compute delay/offset values
      * @throws IllegalArgumentException if message is null
      */
-    public TimeInfo(NtpV3Packet message, long returnTime, List comments,
+    public TimeInfo(NtpV3Packet message, long returnTime, List<String> 
comments,
                    boolean doComputeDetails)
     {
         if (message == null)
@@ -246,7 +246,7 @@
      *
      * @return List or null if not yet computed
      */
-    public List getComments()
+    public List<String> getComments()
     {
         return _comments;
     }

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeStamp.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeStamp.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeStamp.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ntp/TimeStamp.java
 Thu Mar 13 12:55:01 2008
@@ -43,7 +43,7 @@
  * @version $Revision$ $Date$
  * @see java.util.Date
  */
-public class TimeStamp implements java.io.Serializable, Comparable
+public class TimeStamp implements java.io.Serializable, Comparable // TODO add 
comparable type?
 {
 
     /**
@@ -65,8 +65,8 @@
     /*
      * Caches for the DateFormatters used by various toString methods.
      */
-    private static SoftReference simpleFormatter = null;
-    private static SoftReference utcFormatter = null;
+    private static SoftReference<DateFormat> simpleFormatter = null;
+    private static SoftReference<DateFormat> utcFormatter = null;
 
     /**
      * NTP timestamp value: 64-bit unsigned fixed-point number as defined in 
RFC-1305
@@ -406,7 +406,7 @@
     {
         DateFormat formatter = null;
         if (simpleFormatter != null) {
-            formatter = (DateFormat) simpleFormatter.get();
+            formatter = simpleFormatter.get();
         }
         if (formatter == null) {
             // No cache yet, or cached formatter GC'd
@@ -433,7 +433,7 @@
     {
         DateFormat formatter = null;
         if (utcFormatter != null)
-            formatter = (DateFormat) utcFormatter.get();
+            formatter = utcFormatter.get();
         if (formatter == null) {
             // No cache yet, or cached formatter GC'd
             formatter = new SimpleDateFormat(NTP_DATE_FORMAT + " 'UTC'",

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3.java
 Thu Mar 13 12:55:01 2008
@@ -84,7 +84,7 @@
     BufferedReader _reader;
     int _replyCode;
     String _lastReplyLine;
-    Vector _replyLines;
+    Vector<String> _replyLines;
 
     /***
      * A ProtocolCommandSupport object used to manage the registering of
@@ -103,7 +103,7 @@
         __popState = DISCONNECTED_STATE;
         _reader = null;
         __writer = null;
-        _replyLines = new Vector();
+        _replyLines = new Vector<String>();
         _commandSupport_ = new ProtocolCommandSupport(this);
     }
 
@@ -341,13 +341,13 @@
      ***/
     public String getReplyString()
     {
-        Enumeration en;
+        Enumeration<String> en;
         StringBuffer buffer = new StringBuffer(256);
 
         en = _replyLines.elements();
         while (en.hasMoreElements())
         {
-            buffer.append((String)en.nextElement());
+            buffer.append(en.nextElement());
             buffer.append(SocketClient.NETASCII_EOL);
         }
 

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3Client.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3Client.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3Client.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/pop3/POP3Client.java
 Thu Mar 13 12:55:01 2008
@@ -369,7 +369,7 @@
     public POP3MessageInfo[] listMessages() throws IOException
     {
         POP3MessageInfo[] messages;
-        Enumeration en;
+        Enumeration<String> en;
         int line;
 
         if (getState() != TRANSACTION_STATE)
@@ -387,7 +387,7 @@
 
         // Fetch lines.
         for (line = 0; line < messages.length; line++)
-            messages[line] = __parseStatus((String)en.nextElement());
+            messages[line] = __parseStatus(en.nextElement());
 
         return messages;
     }
@@ -441,7 +441,7 @@
     public POP3MessageInfo[] listUniqueIdentifiers() throws IOException
     {
         POP3MessageInfo[] messages;
-        Enumeration en;
+        Enumeration<String> en;
         int line;
 
         if (getState() != TRANSACTION_STATE)
@@ -459,7 +459,7 @@
 
         // Fetch lines.
         for (line = 0; line < messages.length; line++)
-            messages[line] = __parseUID((String)en.nextElement());
+            messages[line] = __parseUID(en.nextElement());
 
         return messages;
     }

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/smtp/RelayPath.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/smtp/RelayPath.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/smtp/RelayPath.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/smtp/RelayPath.java
 Thu Mar 13 12:55:01 2008
@@ -33,7 +33,7 @@
 
 public final class RelayPath
 {
-    Vector _path;
+    Vector<String> _path;
     String _emailAddress;
 
     /***
@@ -44,7 +44,7 @@
      ***/
     public RelayPath(String emailAddress)
     {
-        _path = new Vector();
+        _path = new Vector<String>();
         _emailAddress = emailAddress;
     }
 
@@ -74,7 +74,7 @@
     public String toString()
     {
         StringBuffer buffer = new StringBuffer();
-        Enumeration hosts;
+        Enumeration<String> hosts;
 
         buffer.append('<');
 
@@ -83,12 +83,12 @@
         if (hosts.hasMoreElements())
         {
             buffer.append('@');
-            buffer.append((String)hosts.nextElement());
+            buffer.append(hosts.nextElement());
 
             while (hosts.hasMoreElements())
             {
                 buffer.append(",@");
-                buffer.append((String)hosts.nextElement());
+                buffer.append(hosts.nextElement());
             }
             buffer.append(':');
         }

Modified: 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/tftp/TFTPServer.java
 Thu Mar 13 12:55:01 2008
@@ -314,10 +314,10 @@
 
                synchronized(transfers_)
                {
-                       Iterator it = transfers_.iterator();
+                       Iterator<TFTPTransfer> it = transfers_.iterator();
                        while (it.hasNext())
                        {
-                               ((TFTPTransfer) it.next()).shutdown();
+                               it.next().shutdown();
                        }
                }
 

Modified: 
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/ListingFunctionalTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/ListingFunctionalTest.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/ListingFunctionalTest.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/ListingFunctionalTest.java
 Thu Mar 13 12:55:01 2008
@@ -59,7 +59,7 @@
                     "[.FREEWARE50.XTERM]"
                 }
             };
-        Class clasz = ListingFunctionalTest.class;
+        Class<?> clasz = ListingFunctionalTest.class;
         Method[] methods = clasz.getDeclaredMethods();
         TestSuite allSuites = new TestSuite("FTP Listing Functional Test 
Suite");
 
@@ -116,11 +116,11 @@
      *
      * @return
      */
-    private boolean findByName(List fileList,
+    private boolean findByName(List<?> fileList,
                                String string)
     {
         boolean found = false;
-        Iterator iter = fileList.iterator();
+        Iterator<?> iter = fileList.iterator();
 
         while (iter.hasNext() && !found)
         {
@@ -190,7 +190,7 @@
         client.changeWorkingDirectory(validPath);
 
         FTPListParseEngine engine = client.initiateListParsing();
-        List files = Arrays.asList(engine.getNext(25));
+        List<FTPFile> files = Arrays.asList(engine.getNext(25));
 
         assertTrue(files.toString(),
                    findByName(files, validFilename));
@@ -204,7 +204,7 @@
     {
         FTPListParseEngine engine = client.initiateListParsing(validParserKey,
                                                                validPath);
-        List files = Arrays.asList(engine.getNext(25));
+        List<FTPFile> files = Arrays.asList(engine.getNext(25));
 
         assertTrue(files.toString(),
                    findByName(files, validFilename));
@@ -217,7 +217,7 @@
         throws IOException
     {
         FTPListParseEngine engine = client.initiateListParsing(validPath);
-        List files = Arrays.asList(engine.getNext(25));
+        List<FTPFile> files = Arrays.asList(engine.getNext(25));
 
         assertTrue(files.toString(),
                    findByName(files, validFilename));
@@ -254,7 +254,7 @@
     {
         FTPClientConfig config = new FTPClientConfig(validParserKey);
         client.configure(config);
-        List files = Arrays.asList(client.listFiles(validPath));
+        List<FTPFile> files = Arrays.asList(client.listFiles(validPath));
 
         assertTrue(files.toString(),
                    findByName(files, validFilename));
@@ -265,7 +265,7 @@
     {
         client.changeWorkingDirectory(validPath);
 
-        List files = Arrays.asList(client.listFiles());
+        List<FTPFile> files = Arrays.asList(client.listFiles());
 
         assertTrue(files.toString(),
                    findByName(files, validFilename));
@@ -302,7 +302,7 @@
     public void testListFilesWithPathAndAutodetection()
         throws IOException
     {
-        List files = Arrays.asList(client.listFiles(validPath));
+        List<FTPFile> files = Arrays.asList(client.listFiles(validPath));
 
         assertTrue(files.toString(),
                    findByName(files, validFilename));
@@ -320,7 +320,7 @@
 
         assertNotNull(names);
 
-        List lnames = Arrays.asList(names);
+        List<String> lnames = Arrays.asList(names);
 
         assertTrue(lnames.toString(),
                    lnames.contains(validFilename));
@@ -332,7 +332,7 @@
     public void testListNamesWithPath()
         throws IOException
     {
-        List names = Arrays.asList(client.listNames(validPath));
+        List<String> names = Arrays.asList(client.listNames(validPath));
 
         assertTrue(names.toString(),
                    findByName(names, validFilename));

Modified: 
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java?rev=636854&r1=636853&r2=636854&view=diff
==============================================================================
--- 
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java
 (original)
+++ 
commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java
 Thu Mar 13 12:55:01 2008
@@ -100,8 +100,8 @@
        /**
         * @see 
org.apache.commons.net.ftp.parser.FTPParseTestFramework#getAllGoodListings()
         */
-       protected List getAllGoodListings() {
-               List l = new ArrayList();
+       protected List<String[]> getAllGoodListings() {
+               List<String[]> l = new ArrayList<String[]>();
                l.add(goodsamplesDatasetList);
                l.add(goodsamplesMemberList);
                l.add(goodsamplesJES1List);


Reply via email to