You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2006/10/10 13:09:56 UTC

svn commit: r454697 - /james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/FetchCommand.java

Author: norman
Date: Tue Oct 10 04:09:55 2006
New Revision: 454697

URL: http://svn.apache.org/viewvc?view=rev&rev=454697
Log:
Replace "enum" keywords to be able to compile with java5

Modified:
    james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/FetchCommand.java

Modified: james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/FetchCommand.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/FetchCommand.java?view=diff&rev=454697&r1=454696&r2=454697
==============================================================================
--- james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/FetchCommand.java (original)
+++ james/server/sandbox/imap-integration/src/java/org/apache/james/imapserver/commands/FetchCommand.java Tue Oct 10 04:09:55 2006
@@ -233,18 +233,18 @@
             
         }
         else if ( sectionSpecifier.equalsIgnoreCase( "HEADER" ) ) {
-            Enumeration enum = mimeMessage.getAllHeaderLines();
-            addHeaders( enum, response );
+            Enumeration e = mimeMessage.getAllHeaderLines();
+            addHeaders( e, response );
         }
         else if ( sectionSpecifier.startsWith( "HEADER.FIELDS.NOT " ) ) {
             String[] excludeNames = extractHeaderList( sectionSpecifier, "HEADER.FIELDS.NOT ".length() );
-            Enumeration enum = mimeMessage.getNonMatchingHeaderLines( excludeNames );
-            addHeaders( enum, response );
+            Enumeration e = mimeMessage.getNonMatchingHeaderLines( excludeNames );
+            addHeaders( e, response );
         }
         else if ( sectionSpecifier.startsWith( "HEADER.FIELDS " ) ) {
             String[] includeNames = extractHeaderList( sectionSpecifier, "HEADER.FIELDS ".length() );
-            Enumeration enum = mimeMessage.getMatchingHeaderLines( includeNames );
-            addHeaders( enum, response );
+            Enumeration e = mimeMessage.getMatchingHeaderLines( includeNames );
+            addHeaders( e, response );
         }
         else if ( sectionSpecifier.equalsIgnoreCase( "MIME" ) ) {
             // TODO implement
@@ -327,12 +327,12 @@
         return (String[]) strings.toArray(new String[0]);
     }
 
-    private void addHeaders( Enumeration enum, StringBuffer response )
+    private void addHeaders( Enumeration e, StringBuffer response )
     {
         List lines = new ArrayList();
         int count = 0;
-        while (enum.hasMoreElements()) {
-            String line = (String)enum.nextElement();
+        while (e.hasMoreElements()) {
+            String line = (String)e.nextElement();
             count += line.length() + 2;
             lines.add(line);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org