RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v2]
Mark Powers
duke at openjdk.org
Thu Jun 30 16:22:22 UTC 2022
On Tue, 28 Jun 2022 20:17:23 GMT, Valerie Peng <valeriep at openjdk.org> wrote:
>> Mark Powers has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Valerie fix
>
> src/java.base/share/classes/javax/crypto/AEADBadTagException.java line 48:
>
>> 46:
>> 47: /**
>> 48: * Constructs an <code>AEADBadTagException</code> with the specified
>
> Same as above, use {@code }?
using `{@code }`
> src/java.base/share/classes/javax/crypto/BadPaddingException.java line 44:
>
>> 42:
>> 43: /**
>> 44: * Constructs a <code>BadPaddingException</code> with no detail
>
> Use `{@code }`?
using `{@code }`
> src/java.base/share/classes/javax/crypto/BadPaddingException.java line 53:
>
>> 51:
>> 52: /**
>> 53: * Constructs a <code>BadPaddingException</code> with the specified
>
> Use `{@code }`?
using `{@code }`
> src/java.base/share/classes/javax/crypto/CipherInputStream.java line 33:
>
>> 31:
>> 32: /**
>> 33: * A <code>CipherInputStream</code> is composed of an <code>InputStream</code>
>
> Use `{@code }`? Applies to the rest of changes of this file.
using `{@code }`
> src/java.base/share/classes/javax/crypto/CipherOutputStream.java line 31:
>
>> 29:
>> 30: /**
>> 31: * A <code>CipherOutputStream</code> is composed of an <code>OutputStream</code>
>
> Use `{@code }` for all of the javadoc in this class?
using `{@code }`
> src/java.base/share/classes/javax/crypto/CipherOutputStream.java line 108:
>
>> 106: * <code>OutputStream</code> and a <code>Cipher</code>.
>> 107: * <br>Note: if the specified output stream or cipher is
>> 108: * <code>null</code>, a NullPointerException may be thrown later when
>
> Add {@code } to NullPointerException also
using `{@code }`
> src/java.base/share/classes/javax/crypto/CipherOutputStream.java line 126:
>
>> 124: * using a <code>NullCipher</code>.
>> 125: * <br>Note: if the specified output stream is <code>null</code>, a
>> 126: * NullPointerException may be thrown later when it is used.
>
> Add {@code } to NullPointerException also.
using `{@code }`
> src/java.base/share/classes/javax/crypto/CipherSpi.java line 227:
>
>> 225:
>> 226: /**
>> 227: * Sets the mode of this {@code Cipher}.
>
> Same comment as in the one in Cipher.java, prefer to leave cipher alone.
I believe we're doing `{@code Cipher}` object.
> src/java.base/share/classes/javax/crypto/CryptoAllPermission.java line 64:
>
>> 62: *
>> 63: * @return true if the specified permission is an
>> 64: * instance of <code>CryptoPermission</code>.
>
> Use {@code } for all of the javadoc in this class?
using `{@code }`
> src/java.base/share/classes/javax/crypto/CryptoPermission.java line 40:
>
>> 38: * The <code>CryptoPermission</code> class extends the
>> 39: * <code>java.security.Permission</code> class. A
>> 40: * <code>CryptoPermission</code> object is used to represent
>
> Use {@code } for all of the javadoc in this class?
using `{@code }`
> src/java.base/share/classes/javax/crypto/CryptoPermission.java line 481:
>
>> 479: * @param permission the <code>Permission</code> object to add.
>> 480: *
>> 481: * @exception SecurityException - if this
>
> Should be ok to remove "-"?
removed
> src/java.base/share/classes/javax/crypto/CryptoPermissions.java line 46:
>
>> 44:
>> 45: /**
>> 46: * This class contains <code>CryptoPermission</code> objects, organized into
>
> Use {@code } for all of the javadoc in this class?
using `{@code }`
> src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line 78:
>
>> 76: * the array are copied to protect against subsequent modification.
>> 77: * @exception NullPointerException if the <code>encoded</code> is
>> 78: * <code>null</code>.
>
> Use `{@code }` instead of `<code></code>` for all of the javadoc?
using `{@code }`
> src/java.base/share/classes/javax/crypto/ExemptionMechanism.java line 74:
>
>> 72:
>> 73: /**
>> 74: * Creates an <code>ExemptionMechanism</code> object.
>
> Use `{@code }` instead of `<code></code>` for all of the javadoc?
Yes.
> src/java.base/share/classes/javax/crypto/KeyGenerator.java line 60:
>
>> 58: * method in this {@code KeyGenerator} class that takes these two universally
>> 59: * shared types of arguments. There is also one that takes just a
>> 60: * {@code keysize} argument, and uses the SecureRandom implementation
>
> Add `{@code }` to the SecureRandom?
Fixed.
> src/java.base/share/classes/javax/crypto/KeyGenerator.java line 207:
>
>> 205: * for the specified algorithm.
>> 206: *
>> 207: * <p> This method traverses the list of registered security Providers,
>
> Providers -> providers
Fixed.
> src/java.base/share/classes/javax/crypto/KeyGenerator.java line 208:
>
>> 206: *
>> 207: * <p> This method traverses the list of registered security Providers,
>> 208: * starting with the most preferred Provider.
>
> Provider -> provider
Fixed.
> src/java.base/share/classes/javax/crypto/KeyGenerator.java line 211:
>
>> 209: * A new {@code KeyGenerator} object encapsulating the
>> 210: * {@code KeyGeneratorSpi} implementation from the first
>> 211: * Provider that supports the specified algorithm is returned.
>
> Provider -> provider
Fixed.
> src/java.base/share/classes/javax/crypto/KeyGenerator.java line 298:
>
>> 296: * <p> A new {@code KeyGenerator} object encapsulating the
>> 297: * {@code KeyGeneratorSpi} implementation from the specified Provider
>> 298: * object is returned. Note that the specified Provider object
>
> Same for this one as well.
Fixed.
> src/java.base/share/classes/javax/crypto/Mac.java line 146:
>
>> 144: *
>> 145: * <p> This method traverses the list of registered security Providers,
>> 146: * starting with the most preferred Provider.
>
> Change "Providers"/"Provider" to start with lowercase.
Fixed.
> src/java.base/share/classes/javax/crypto/Mac.java line 149:
>
>> 147: * A new {@code Mac} object encapsulating the
>> 148: * {@code MacSpi} implementation from the first
>> 149: * Provider that supports the specified algorithm is returned.
>
> Provider -> provider
Fixed.
> src/java.base/share/classes/javax/crypto/Mac.java line 243:
>
>> 241: *
>> 242: * <p> A new {@code Mac} object encapsulating the
>> 243: * {@code MacSpi} implementation from the specified Provider
>
> Provider -> provider
Fixed.
> src/java.base/share/classes/javax/crypto/NoSuchPaddingException.java line 45:
>
>> 43:
>> 44: /**
>> 45: * Constructs a <code>NoSuchPaddingException</code> with no detail
>
> Use `{@code }` for all of the javadoc in this class?
using `{@code }`
> src/java.base/share/classes/javax/crypto/NoSuchPaddingException.java line 46:
>
>> 44: /**
>> 45: * Constructs a <code>NoSuchPaddingException</code> with no detail
>> 46: * message. A detail message is a String that describes this
>
> Add `{@code }` to String
Fixed everywhere.
> src/java.base/share/classes/javax/crypto/NullCipher.java line 29:
>
>> 27:
>> 28: /**
>> 29: * The <code>NullCipher</code> class is a class that provides an
>
> Use `{@code }` for all of the javadoc in this class?
using `{@code }`
> src/java.base/share/classes/javax/crypto/ProviderVerifier.java line 54:
>
>> 52:
>> 53: /**
>> 54: * Creates a <code>ProviderVerifier</code> object to verify the given URL.
>
> Use `{@code }` for all of the javadoc in this class?
using `{@code }`
> src/java.base/share/classes/javax/crypto/SealedObject.java line 43:
>
>> 41: * confidentiality with a cryptographic algorithm.
>> 42: *
>> 43: * <p> Given any Serializable object, one can create a <code>SealedObject</code>
>
> Use `{@code }` for all of the javadoc in this class?
using `{@code }`
> src/java.base/share/classes/javax/crypto/SealedObject.java line 195:
>
>> 193: /**
>> 194: * Constructs a <code>SealedObject</code> object from the passed-in
>> 195: * SealedObject.
>
> Add `{@code }` to SealedObject?
using `{@code }`
> src/java.base/share/classes/javax/crypto/SealedObject.java line 198:
>
>> 196: *
>> 197: * @param so a <code>SealedObject</code> object
>> 198: * @exception NullPointerException if the given sealed object is null.
>
> Add `{@code }` to null?
Fixed.
> src/java.base/share/classes/javax/crypto/SecretKeyFactory.java line 131:
>
>> 129: * A new {@code SecretKeyFactory} object encapsulating the
>> 130: * {@code SecretKeyFactorySpi} implementation from the first
>> 131: * Provider that supports the specified algorithm is returned.
>
> Provider -> provider
Fixed.
> src/java.base/share/classes/javax/crypto/SecretKeyFactory.java line 219:
>
>> 217: *
>> 218: * <p> A new {@code SecretKeyFactory} object encapsulating the
>> 219: * {@code SecretKeyFactorySpi} implementation from the specified Provider
>
> Provider->provider
Fixed.
> src/java.base/share/classes/javax/crypto/ShortBufferException.java line 45:
>
>> 43:
>> 44: /**
>> 45: * Constructs a <code>ShortBufferException</code> with no detail
>
> Use `{@code }` for all of the javadoc in this class?
using `{@code }`
-------------
PR: https://git.openjdk.org/jdk/pull/9282
More information about the security-dev
mailing list