Examples of NoneException


Examples of nl.kii.util.NoneException

@SuppressWarnings("all")
public class None<T extends Object> extends Opt<T> {
  public T value() {
    try {
      throw new NoneException();
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

Examples of nl.kii.util.NoneException

    return this.exception.getStackTrace();
  }
 
  public T value() {
    try {
      throw new NoneException();
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

Examples of nl.kii.util.NoneException

        }
      }
      if (!_matched) {
        if (o instanceof None) {
          _matched=true;
          throw new NoneException();
        }
      }
      if (!_matched) {
        if (o instanceof Some) {
          _matched=true;
View Full Code Here

Examples of org.apache.james.jspf.core.exceptions.NoneException

        // check the version "header"
        if (spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION1 + " ") || spfRecord.equalsIgnoreCase(SPF1Constants.SPF_VERSION1)) {
            if (!spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION1 + " ")) throw new NeutralException("Empty SPF Record");
        } else {
            throw new NoneException("No valid SPF Record: " + spfRecord);
        }

        // extract terms
        String[] terms = termsSeparatorPattern.split(spfRecord.replaceFirst(
                SPF1Constants.SPF_VERSION1, ""));
View Full Code Here

Examples of org.apache.james.jspf.core.exceptions.NoneException

    public DNSRequest(final String hostname, final int recordType) throws NoneException {
        if (recordType == MX || recordType == A || recordType == AAAA) {
            try {
                Name.fromString(hostname);
            } catch (TextParseException e) {
                throw new NoneException(e.getMessage());
            }
        }
        this.hostname = hostname;
        this.recordType = recordType;
    }
View Full Code Here

Examples of org.apache.james.jspf.core.exceptions.NoneException

    /**
     * @see org.apache.james.jspf.policies.PolicyPostFilter#getSPFRecord(java.lang.String, org.apache.james.jspf.core.SPF1Record)
     */
    public SPF1Record getSPFRecord(String currentDomain, SPF1Record res) throws PermErrorException, TempErrorException, NoneException, NeutralException {
        if (res == null) {
            throw new NoneException("No SPF record found for host: " + currentDomain);
        } else {
            return res;
        }
    }
View Full Code Here

Examples of org.apache.james.jspf.core.exceptions.NoneException

            String currentDomain = spfData.getCurrentDomain();
            if (currentDomain != null) {
                String[] labels = currentDomain.split("\\.");
                for (int i = 0; i < labels.length; i++) {
                    if (labels[i] != null && labels[i].length() > 63) {
                        throw new NoneException("Domain "+currentDomain+" is malformed (label longer than 63 characters)");
                    }
                }
            }
           
            if (spfData.getSenderDomain().indexOf('.') < 0) {
                throw new NoneException("Sender domain "+spfData.getSenderDomain()+" is not an FQDN.");
            }
           
            try {
                Name.fromString(spfData.getSenderDomain());
            } catch (TextParseException e) {
                throw new NoneException("Invalid sender domain: "+e.getMessage());
            }
        }
        return null;
    }
View Full Code Here

Examples of org.apache.james.jspf.core.exceptions.NoneException

        } else {
            String[] fromParts = mailFrom.split("@");

            // should never be bigger as 2 !
            if (fromParts.length > 2) {
                throw new NoneException("Not a valid email address " + mailFrom);
            } else if (fromParts.length == 2) {
                this.currentSenderPart = fromParts[0];
                this.senderDomain = fromParts[1];
            } else {
                this.currentSenderPart = "postmaster";
View Full Code Here

Examples of org.apache.james.jspf.core.exceptions.NoneException

        // check the version "header"
        if (spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION1 + " ") || spfRecord.equalsIgnoreCase(SPF1Constants.SPF_VERSION1)) {
            if (!spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION1 + " ")) throw new NeutralException("Empty SPF Record");
        } else {
            throw new NoneException("No valid SPF Record: " + spfRecord);
        }

        // extract terms
        String[] terms = termsSeparatorPattern.split(spfRecord.replaceFirst(
                SPF1Constants.SPF_VERSION1, ""));
View Full Code Here

Examples of org.apache.james.jspf.exceptions.NoneException

        // check the version "header"
        if (spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION + " ") || spfRecord.equalsIgnoreCase(SPF1Constants.SPF_VERSION)) {
            if (!spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION + " ")) throw new NeutralException("Empty SPF Record");
        } else {
            throw new NoneException("No valid SPF Record: " + spfRecord);
        }

        // extract terms
        String[] terms = termsSeparatorPattern.split(spfRecord.replaceFirst(
                SPF1Constants.SPF_VERSION, ""));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.