--- old/src/share/classes/java/security/cert/X509CRLSelector.java 2013-06-25 12:29:24.070235971 -0700 +++ new/src/share/classes/java/security/cert/X509CRLSelector.java 2013-06-25 12:29:23.910235974 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,18 +37,18 @@ import sun.security.x509.X500Name; /** - * A CRLSelector that selects X509CRLs that + * A {@code CRLSelector} that selects {@code X509CRLs} that * match all specified criteria. This class is particularly useful when - * selecting CRLs from a CertStore to check revocation status + * selecting CRLs from a {@code CertStore} to check revocation status * of a particular certificate. *

- * When first constructed, an X509CRLSelector has no criteria - * enabled and each of the get methods return a default - * value (null). Therefore, the {@link #match match} method - * would return true for any X509CRL. Typically, + * When first constructed, an {@code X509CRLSelector} has no criteria + * enabled and each of the {@code get} methods return a default + * value ({@code null}). Therefore, the {@link #match match} method + * would return {@code true} for any {@code X509CRL}. Typically, * several criteria are enabled (by calling {@link #setIssuers setIssuers} * or {@link #setDateAndTime setDateAndTime}, for instance) and then the - * X509CRLSelector is passed to + * {@code X509CRLSelector} is passed to * {@link CertStore#getCRLs CertStore.getCRLs} or some similar * method. *

@@ -86,35 +86,35 @@ private long skew = 0; /** - * Creates an X509CRLSelector. Initially, no criteria are set - * so any X509CRL will match. + * Creates an {@code X509CRLSelector}. Initially, no criteria are set + * so any {@code X509CRL} will match. */ public X509CRLSelector() {} /** * Sets the issuerNames criterion. The issuer distinguished name in the - * X509CRL must match at least one of the specified - * distinguished names. If null, any issuer distinguished name + * {@code X509CRL} must match at least one of the specified + * distinguished names. If {@code null}, any issuer distinguished name * will do. *

* This method allows the caller to specify, with a single method call, - * the complete set of issuer names which X509CRLs may contain. + * the complete set of issuer names which {@code X509CRLs} may contain. * The specified value replaces the previous value for the issuerNames * criterion. *

- * The names parameter (if not null) is a - * Collection of X500Principals. + * The {@code names} parameter (if not {@code null}) is a + * {@code Collection} of {@code X500Principal}s. *

- * Note that the names parameter can contain duplicate + * Note that the {@code names} parameter can contain duplicate * distinguished names, but they may be removed from the - * Collection of names returned by the + * {@code Collection} of names returned by the * {@link #getIssuers getIssuers} method. *

- * Note that a copy is performed on the Collection to + * Note that a copy is performed on the {@code Collection} to * protect against subsequent modifications. * - * @param issuers a Collection of X500Principals - * (or null) + * @param issuers a {@code Collection} of X500Principals + * (or {@code null}) * @see #getIssuers * @since 1.5 */ @@ -138,31 +138,31 @@ * this method. See {@link #addIssuerName(String)} for more information. *

* Sets the issuerNames criterion. The issuer distinguished name in the - * X509CRL must match at least one of the specified - * distinguished names. If null, any issuer distinguished name + * {@code X509CRL} must match at least one of the specified + * distinguished names. If {@code null}, any issuer distinguished name * will do. *

* This method allows the caller to specify, with a single method call, - * the complete set of issuer names which X509CRLs may contain. + * the complete set of issuer names which {@code X509CRLs} may contain. * The specified value replaces the previous value for the issuerNames * criterion. *

- * The names parameter (if not null) is a - * Collection of names. Each name is a String + * The {@code names} parameter (if not {@code null}) is a + * {@code Collection} of names. Each name is a {@code String} * or a byte array representing a distinguished name (in * RFC 2253 or - * ASN.1 DER encoded form, respectively). If null is supplied + * ASN.1 DER encoded form, respectively). If {@code null} is supplied * as the value for this argument, no issuerNames check will be performed. *

- * Note that the names parameter can contain duplicate + * Note that the {@code names} parameter can contain duplicate * distinguished names, but they may be removed from the - * Collection of names returned by the + * {@code Collection} of names returned by the * {@link #getIssuerNames getIssuerNames} method. *

* If a name is specified as a byte array, it should contain a single DER * encoded distinguished name, as defined in X.501. The ASN.1 notation for * this structure is as follows. - *


+     * 
{@code
      * Name ::= CHOICE {
      *   RDNSequence }
      *
@@ -185,12 +185,12 @@
      *       universalString         UniversalString (SIZE (1..MAX)),
      *       utf8String              UTF8String (SIZE (1.. MAX)),
      *       bmpString               BMPString (SIZE (1..MAX)) }
-     * 
+ * }
*

- * Note that a deep copy is performed on the Collection to + * Note that a deep copy is performed on the {@code Collection} to * protect against subsequent modifications. * - * @param names a Collection of names (or null) + * @param names a {@code Collection} of names (or {@code null}) * @throws IOException if a parsing error occurs * @see #getIssuerNames */ @@ -208,11 +208,11 @@ /** * Adds a name to the issuerNames criterion. The issuer distinguished - * name in the X509CRL must match at least one of the specified + * name in the {@code X509CRL} must match at least one of the specified * distinguished names. *

* This method allows the caller to add a name to the set of issuer names - * which X509CRLs may contain. The specified name is added to + * which {@code X509CRLs} may contain. The specified name is added to * any previous value for the issuerNames criterion. * If the specified name is a duplicate, it may be ignored. * @@ -232,11 +232,11 @@ * names. *

* Adds a name to the issuerNames criterion. The issuer distinguished - * name in the X509CRL must match at least one of the specified + * name in the {@code X509CRL} must match at least one of the specified * distinguished names. *

* This method allows the caller to add a name to the set of issuer names - * which X509CRLs may contain. The specified name is added to + * which {@code X509CRLs} may contain. The specified name is added to * any previous value for the issuerNames criterion. * If the specified name is a duplicate, it may be ignored. * @@ -249,11 +249,11 @@ /** * Adds a name to the issuerNames criterion. The issuer distinguished - * name in the X509CRL must match at least one of the specified + * name in the {@code X509CRL} must match at least one of the specified * distinguished names. *

* This method allows the caller to add a name to the set of issuer names - * which X509CRLs may contain. The specified name is added to + * which {@code X509CRLs} may contain. The specified name is added to * any previous value for the issuerNames criterion. If the specified name * is a duplicate, it may be ignored. * If a name is specified as a byte array, it should contain a single DER @@ -279,7 +279,7 @@ /** * A private method that adds a name (String or byte array) to the * issuerNames criterion. The issuer distinguished - * name in the X509CRL must match at least one of the specified + * name in the {@code X509CRL} must match at least one of the specified * distinguished names. * * @param name the name in string or byte array form @@ -301,11 +301,11 @@ * Clone and check an argument of the form passed to * setIssuerNames. Throw an IOException if the argument is malformed. * - * @param names a Collection of names. Each entry is a + * @param names a {@code Collection} of names. Each entry is a * String or a byte array (the name, in string or ASN.1 - * DER encoded form, respectively). null is + * DER encoded form, respectively). {@code null} is * not an acceptable value. - * @return a deep copy of the specified Collection + * @return a deep copy of the specified {@code Collection} * @throws IOException if a parsing error occurs */ private static HashSet cloneAndCheckIssuerNames(Collection names) @@ -334,11 +334,11 @@ * into a RuntimeException. This method should be used when the object being * cloned has already been checked, so there should never be any exceptions. * - * @param names a Collection of names. Each entry is a + * @param names a {@code Collection} of names. Each entry is a * String or a byte array (the name, in string or ASN.1 - * DER encoded form, respectively). null is + * DER encoded form, respectively). {@code null} is * not an acceptable value. - * @return a deep copy of the specified Collection + * @return a deep copy of the specified {@code Collection} * @throws RuntimeException if a parsing error occurs */ private static HashSet cloneIssuerNames(Collection names) { @@ -354,7 +354,7 @@ * returning a Collection of issuerX500Principals. * Throw an IOException if the argument is malformed. * - * @param names a Collection of names. Each entry is a + * @param names a {@code Collection} of names. Each entry is a * String or a byte array (the name, in string or ASN.1 * DER encoded form, respectively). Null is * not an acceptable value. @@ -380,24 +380,24 @@ } /** - * Sets the minCRLNumber criterion. The X509CRL must have a + * Sets the minCRLNumber criterion. The {@code X509CRL} must have a * CRL number extension whose value is greater than or equal to the - * specified value. If null, no minCRLNumber check will be + * specified value. If {@code null}, no minCRLNumber check will be * done. * - * @param minCRL the minimum CRL number accepted (or null) + * @param minCRL the minimum CRL number accepted (or {@code null}) */ public void setMinCRLNumber(BigInteger minCRL) { this.minCRL = minCRL; } /** - * Sets the maxCRLNumber criterion. The X509CRL must have a + * Sets the maxCRLNumber criterion. The {@code X509CRL} must have a * CRL number extension whose value is less than or equal to the - * specified value. If null, no maxCRLNumber check will be + * specified value. If {@code null}, no maxCRLNumber check will be * done. * - * @param maxCRL the maximum CRL number accepted (or null) + * @param maxCRL the maximum CRL number accepted (or {@code null}) */ public void setMaxCRLNumber(BigInteger maxCRL) { this.maxCRL = maxCRL; @@ -406,16 +406,16 @@ /** * Sets the dateAndTime criterion. The specified date must be * equal to or later than the value of the thisUpdate component - * of the X509CRL and earlier than the value of the - * nextUpdate component. There is no match if the X509CRL + * of the {@code X509CRL} and earlier than the value of the + * nextUpdate component. There is no match if the {@code X509CRL} * does not contain a nextUpdate component. - * If null, no dateAndTime check will be done. + * If {@code null}, no dateAndTime check will be done. *

- * Note that the Date supplied here is cloned to protect + * Note that the {@code Date} supplied here is cloned to protect * against subsequent modifications. * - * @param dateAndTime the Date to match against - * (or null) + * @param dateAndTime the {@code Date} to match against + * (or {@code null}) * @see #getDateAndTime */ public void setDateAndTime(Date dateAndTime) { @@ -438,13 +438,13 @@ /** * Sets the certificate being checked. This is not a criterion. Rather, - * it is optional information that may help a CertStore + * it is optional information that may help a {@code CertStore} * find CRLs that would be relevant when checking revocation for the - * specified certificate. If null is specified, then no + * specified certificate. If {@code null} is specified, then no * such optional information is provided. * - * @param cert the X509Certificate being checked - * (or null) + * @param cert the {@code X509Certificate} being checked + * (or {@code null}) * @see #getCertificateChecking */ public void setCertificateChecking(X509Certificate cert) { @@ -453,15 +453,15 @@ /** * Returns the issuerNames criterion. The issuer distinguished - * name in the X509CRL must match at least one of the specified - * distinguished names. If the value returned is null, any + * name in the {@code X509CRL} must match at least one of the specified + * distinguished names. If the value returned is {@code null}, any * issuer distinguished name will do. *

- * If the value returned is not null, it is a - * unmodifiable Collection of X500Principals. + * If the value returned is not {@code null}, it is a + * unmodifiable {@code Collection} of {@code X500Principal}s. * - * @return an unmodifiable Collection of names - * (or null) + * @return an unmodifiable {@code Collection} of names + * (or {@code null}) * @see #setIssuers * @since 1.5 */ @@ -474,25 +474,25 @@ /** * Returns a copy of the issuerNames criterion. The issuer distinguished - * name in the X509CRL must match at least one of the specified - * distinguished names. If the value returned is null, any + * name in the {@code X509CRL} must match at least one of the specified + * distinguished names. If the value returned is {@code null}, any * issuer distinguished name will do. *

- * If the value returned is not null, it is a - * Collection of names. Each name is a String + * If the value returned is not {@code null}, it is a + * {@code Collection} of names. Each name is a {@code String} * or a byte array representing a distinguished name (in RFC 2253 or * ASN.1 DER encoded form, respectively). Note that the - * Collection returned may contain duplicate names. + * {@code Collection} returned may contain duplicate names. *

* If a name is specified as a byte array, it should contain a single DER * encoded distinguished name, as defined in X.501. The ASN.1 notation for * this structure is given in the documentation for * {@link #setIssuerNames setIssuerNames(Collection names)}. *

- * Note that a deep copy is performed on the Collection to + * Note that a deep copy is performed on the {@code Collection} to * protect against subsequent modifications. * - * @return a Collection of names (or null) + * @return a {@code Collection} of names (or {@code null}) * @see #setIssuerNames */ public Collection getIssuerNames() { @@ -503,23 +503,23 @@ } /** - * Returns the minCRLNumber criterion. The X509CRL must have a + * Returns the minCRLNumber criterion. The {@code X509CRL} must have a * CRL number extension whose value is greater than or equal to the - * specified value. If null, no minCRLNumber check will be done. + * specified value. If {@code null}, no minCRLNumber check will be done. * - * @return the minimum CRL number accepted (or null) + * @return the minimum CRL number accepted (or {@code null}) */ public BigInteger getMinCRL() { return minCRL; } /** - * Returns the maxCRLNumber criterion. The X509CRL must have a + * Returns the maxCRLNumber criterion. The {@code X509CRL} must have a * CRL number extension whose value is less than or equal to the - * specified value. If null, no maxCRLNumber check will be + * specified value. If {@code null}, no maxCRLNumber check will be * done. * - * @return the maximum CRL number accepted (or null) + * @return the maximum CRL number accepted (or {@code null}) */ public BigInteger getMaxCRL() { return maxCRL; @@ -528,15 +528,15 @@ /** * Returns the dateAndTime criterion. The specified date must be * equal to or later than the value of the thisUpdate component - * of the X509CRL and earlier than the value of the + * of the {@code X509CRL} and earlier than the value of the * nextUpdate component. There is no match if the - * X509CRL does not contain a nextUpdate component. - * If null, no dateAndTime check will be done. + * {@code X509CRL} does not contain a nextUpdate component. + * If {@code null}, no dateAndTime check will be done. *

- * Note that the Date returned is cloned to protect against + * Note that the {@code Date} returned is cloned to protect against * subsequent modifications. * - * @return the Date to match against (or null) + * @return the {@code Date} to match against (or {@code null}) * @see #setDateAndTime */ public Date getDateAndTime() { @@ -547,12 +547,12 @@ /** * Returns the certificate being checked. This is not a criterion. Rather, - * it is optional information that may help a CertStore + * it is optional information that may help a {@code CertStore} * find CRLs that would be relevant when checking revocation for the - * specified certificate. If the value returned is null, then + * specified certificate. If the value returned is {@code null}, then * no such optional information is provided. * - * @return the certificate being checked (or null) + * @return the certificate being checked (or {@code null}) * @see #setCertificateChecking */ public X509Certificate getCertificateChecking() { @@ -560,10 +560,10 @@ } /** - * Returns a printable representation of the X509CRLSelector. + * Returns a printable representation of the {@code X509CRLSelector}. * - * @return a String describing the contents of the - * X509CRLSelector. + * @return a {@code String} describing the contents of the + * {@code X509CRLSelector}. */ public String toString() { StringBuffer sb = new StringBuffer(); @@ -587,11 +587,11 @@ } /** - * Decides whether a CRL should be selected. + * Decides whether a {@code CRL} should be selected. * - * @param crl the CRL to be checked - * @return true if the CRL should be selected, - * false otherwise + * @param crl the {@code CRL} to be checked + * @return {@code true} if the {@code CRL} should be selected, + * {@code false} otherwise */ public boolean match(CRL crl) { if (!(crl instanceof X509CRL)) {