james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r532390 - in /james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf: SPF.java core/Directive.java policies/SPFStrictCheckerRetriever.java terms/MXMechanism.java terms/PTRMechanism.java
Date Wed, 25 Apr 2007 15:32:12 GMT
Author: norman
Date: Wed Apr 25 08:32:10 2007
New Revision: 532390

URL: http://svn.apache.org/viewvc?view=rev&rev=532390
Log:
use removeAttribute to reset the attributes ( better style)

Modified:
    james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/SPF.java
    james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/Directive.java
    james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/policies/SPFStrictCheckerRetriever.java
    james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/MXMechanism.java
    james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java

Modified: james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/SPF.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/SPF.java?view=diff&rev=532390&r1=532389&r2=532390
==============================================================================
--- james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/SPF.java (original)
+++ james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/SPF.java Wed Apr 25
08:32:10 2007
@@ -110,7 +110,7 @@
             
             SPF1Record spfRecord = (SPF1Record) spfData.getAttribute(ATTRIBUTE_SPF1_RECORD);
             // make sure we cleanup the record, for recursion support
-            spfData.setAttribute(ATTRIBUTE_SPF1_RECORD, null);
+            spfData.removeAttribute(ATTRIBUTE_SPF1_RECORD);
             
             LinkedList policyCheckers = new LinkedList();
             

Modified: james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/Directive.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/Directive.java?view=diff&rev=532390&r1=532389&r2=532390
==============================================================================
--- james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/Directive.java
(original)
+++ james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/Directive.java
Wed Apr 25 08:32:10 2007
@@ -99,7 +99,7 @@
         // if already have a current result we don't run this
         if (spfData.getCurrentResult() == null) {
 
-            spfData.setAttribute(ATTRIBUTE_MECHANISM_RESULT, null);
+            spfData.removeAttribute(ATTRIBUTE_MECHANISM_RESULT);
 
             spfData.pushChecker(resultChecker);
             

Modified: james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/policies/SPFStrictCheckerRetriever.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/policies/SPFStrictCheckerRetriever.java?view=diff&rev=532390&r1=532389&r2=532390
==============================================================================
--- james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/policies/SPFStrictCheckerRetriever.java
(original)
+++ james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/policies/SPFStrictCheckerRetriever.java
Wed Apr 25 08:32:10 2007
@@ -76,6 +76,9 @@
     }
 
 
+    /**
+     * @see org.apache.james.jspf.policies.SPFRetriever#checkSPF(org.apache.james.jspf.core.SPFSession)
+     */
     public DNSLookupContinuation checkSPF(SPFSession spfData)
             throws PermErrorException, TempErrorException, NeutralException,
             NoneException {

Modified: james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/MXMechanism.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/MXMechanism.java?view=diff&rev=532390&r1=532389&r2=532390
==============================================================================
--- james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/MXMechanism.java
(original)
+++ james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/MXMechanism.java
Wed Apr 25 08:32:10 2007
@@ -142,8 +142,8 @@
             checkAddress = IPAddr.getAddress(spfSession.getIpAddress(), isIPv6 ? getIp6cidr()
: getIp4cidr());
             
             // clean up attributes
-            spfSession.setAttribute(ATTRIBUTE_CHECK_RECORDS, null);
-            spfSession.setAttribute(ATTRIBUTE_MX_RECORDS, null);
+            spfSession.removeAttribute(ATTRIBUTE_CHECK_RECORDS);
+            spfSession.removeAttribute(ATTRIBUTE_MX_RECORDS);
             spfSession.setAttribute(Directive.ATTRIBUTE_MECHANISM_RESULT, Boolean.valueOf(checkAddressList(checkAddress,
mxR, getIp4cidr())));
             return null;
             

Modified: james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java?view=diff&rev=532390&r1=532389&r2=532390
==============================================================================
--- james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java
(original)
+++ james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java
Wed Apr 25 08:32:10 2007
@@ -56,8 +56,8 @@
             public DNSLookupContinuation checkSPF(SPFSession spfData)
                     throws PermErrorException, TempErrorException,
                     NeutralException, NoneException {
-                spfData.setAttribute(ATTRIBUTE_DOMAIN_LIST, null);
-                spfData.setAttribute(ATTRIBUTE_CURRENT_DOMAIN, null);
+                spfData.removeAttribute(ATTRIBUTE_DOMAIN_LIST);
+                spfData.removeAttribute(ATTRIBUTE_CURRENT_DOMAIN);
                 return null;
             }
         }



---------------------------------------------------------------------
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