james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r230675 - in /james/server/trunk/src/java/org/apache/james: fetchmail/MessageProcessor.java nntpserver/repository/ArticleIDRepository.java userrepository/UsersLDAPRepository.java
Date Sun, 07 Aug 2005 15:54:16 GMT
Author: bago
Date: Sun Aug  7 08:54:00 2005
New Revision: 230675

URL: http://svn.apache.org/viewcvs?rev=230675&view=rev
Log:
removed "enum" for jdk1.5 compatibility (JAMES-237)

Modified:
    james/server/trunk/src/java/org/apache/james/fetchmail/MessageProcessor.java
    james/server/trunk/src/java/org/apache/james/nntpserver/repository/ArticleIDRepository.java
    james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java

Modified: james/server/trunk/src/java/org/apache/james/fetchmail/MessageProcessor.java
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/fetchmail/MessageProcessor.java?rev=230675&r1=230674&r2=230675&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/fetchmail/MessageProcessor.java (original)
+++ james/server/trunk/src/java/org/apache/james/fetchmail/MessageProcessor.java Sun Aug 
7 08:54:00 2005
@@ -17,7 +17,6 @@
  
 package org.apache.james.fetchmail;
 
-import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
@@ -28,11 +27,8 @@
 
 import javax.mail.Address;
 import javax.mail.Flags;
-import javax.mail.Folder;
 import javax.mail.MessagingException;
-import javax.mail.Session;
 import javax.mail.internet.InternetAddress;
-import javax.mail.internet.InternetHeaders;
 import javax.mail.internet.MimeMessage;
 import javax.mail.internet.ParseException;
 
@@ -932,13 +928,13 @@
      */
     protected boolean isBouncing() throws MessagingException
     {
-        Enumeration enum =
+        Enumeration enumeration =
             getMessageIn().getMatchingHeaderLines(
                 new String[] { "X-fetched-from" });
         int count = 0;
-        while (enum.hasMoreElements())
+        while (enumeration.hasMoreElements())
         {
-            String header = (String) enum.nextElement();
+            String header = (String) enumeration.nextElement();
             if (header.equals(getFetchTaskName()))
                 count++;
         }
@@ -991,11 +987,11 @@
     {
         try
         {
-            Enumeration enum =
+            Enumeration enumeration =
                 msg.getMatchingHeaderLines(new String[] { "Received" });
-            while (enum.hasMoreElements())
+            while (enumeration.hasMoreElements())
             {
-                String received = (String) enum.nextElement();
+                String received = (String) enumeration.nextElement();
 
                 int nextSearchAt = 0;
                 int i = 0;

Modified: james/server/trunk/src/java/org/apache/james/nntpserver/repository/ArticleIDRepository.java
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/nntpserver/repository/ArticleIDRepository.java?rev=230675&r1=230674&r2=230675&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/nntpserver/repository/ArticleIDRepository.java
(original)
+++ james/server/trunk/src/java/org/apache/james/nntpserver/repository/ArticleIDRepository.java
Sun Aug  7 08:54:00 2005
@@ -172,10 +172,10 @@
                 fin.close();
             }
         }
-        Enumeration enum = prop.keys();
+        Enumeration enumeration = prop.keys();
         NNTPArticle article = null;
-        while ( article == null && enum.hasMoreElements() ) {
-            String groupName = (String)enum.nextElement();
+        while ( article == null && enumeration.hasMoreElements() ) {
+            String groupName = (String)enumeration.nextElement();
             int number = Integer.parseInt(prop.getProperty(groupName));
             NNTPGroup group = repo.getGroup(groupName);
             if ( group != null ) {

Modified: james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java
URL: http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java?rev=230675&r1=230674&r2=230675&view=diff
==============================================================================
--- james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java (original)
+++ james/server/trunk/src/java/org/apache/james/userrepository/UsersLDAPRepository.java Sun
Aug  7 08:54:00 2005
@@ -27,7 +27,6 @@
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.LogEnabled;
 import org.apache.avalon.framework.logger.Logger;
 import org.apache.james.Constants;
 import org.apache.james.services.User;
@@ -233,9 +232,9 @@
             Attribute members
                 = ctx.getAttributes("", attrIDs).get(membersAttr);
             if (members != null) {
-                NamingEnumeration enum = members.getAll();
-                while (enum.hasMore()) {
-                    result.add((String)enum.next());
+                NamingEnumeration enumeration = members.getAll();
+                while (enumeration.hasMore()) {
+                    result.add(enumeration.next());
                 }
             }
         } catch (NamingException e) {
@@ -373,10 +372,10 @@
                         .append(usersDomain);
             String filter = filterBuffer.toString();
 
-            NamingEnumeration enum  = rootCtx.search("", filter, ctls);
+            NamingEnumeration enumeration  = rootCtx.search("", filter, ctls);
 
-            if (enum.hasMore()) { // ie User is in Directory
-                SearchResult newSr = (SearchResult)enum.next();
+            if (enumeration.hasMore()) { // ie User is in Directory
+                SearchResult newSr = (SearchResult)enumeration.next();
                 String userDN = newSr.getName();
                 Attribute servers = rootCtx.getAttributes(userDN, returnAttrs).get(groupAttr);
 
@@ -500,10 +499,10 @@
                         .append(usersDomain);
             String filter = filterBuffer.toString();
 
-            NamingEnumeration enum  = rootCtx.search("", filter, ctls);
+            NamingEnumeration enumeration  = rootCtx.search("", filter, ctls);
 
-            if (enum.hasMore()) { // ie User is in Directory
-                SearchResult newSr = (SearchResult)enum.next();
+            if (enumeration.hasMore()) { // ie User is in Directory
+                SearchResult newSr = (SearchResult)enumeration.next();
                 String userDN = newSr.getName();
 
                 System.out.println("Found user entry: " + userDN);
@@ -621,9 +620,9 @@
             try {
                 rootCtx = new InitialDirContext(env);
     
-                NamingEnumeration enum  = rootCtx.search("", filter, ctls);
-                if (enum.hasMore()) { // ie User is in Directory
-                    SearchResult sr = (SearchResult)enum.next();
+                NamingEnumeration enumeration  = rootCtx.search("", filter, ctls);
+                if (enumeration.hasMore()) { // ie User is in Directory
+                    SearchResult sr = (SearchResult)enumeration.next();
                     String userRDN = sr.getName();
                     StringBuffer userDNBuffer =
                         new StringBuffer(128)



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


Mime
View raw message