RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

Valerie Peng valeriep at openjdk.org
Wed Jul 6 23:39:58 UTC 2022


On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers <duke at openjdk.org> wrote:

>> https://bugs.openjdk.org/browse/JDK-8284851
>
> Mark Powers has updated the pull request incrementally with one additional commit since the last revision:
> 
>   aw shucks - another one

src/java.base/share/classes/javax/crypto/CryptoPermission.java line 359:

> 357: 
> 358:     /**
> 359:      * Returns a string describing this {@code CryptoPermission}.

add object here.

src/java.base/share/classes/javax/crypto/CryptoPermission.java line 365:

> 363:      * format: '("ClassName" "algorithm" "keysize" "exemption_mechanism")'.
> 364:      *
> 365:      * @return information about this {@code CryptoPermission}.

add object here.

src/java.base/share/classes/javax/crypto/CryptoPermission.java line 451:

> 449: 
> 450: /**
> 451:  * A {@code CryptoPermissionCollection} stores a set of

add object here.

src/java.base/share/classes/javax/crypto/CryptoPermission.java line 452:

> 450: /**
> 451:  * A {@code CryptoPermissionCollection} stores a set of
> 452:  * {@code CryptoPermission} permissions.

Use `objects` instead of `permissions` for consistency's sake?

src/java.base/share/classes/javax/crypto/CryptoPermission.java line 477:

> 475: 
> 476:     /**
> 477:      * Adds a permission to the {@code CryptoPermissionCollection}.

add object here.

src/java.base/share/classes/javax/crypto/CryptoPermission.java line 502:

> 500:      * @param permission the {@code Permission} object to compare
> 501:      *
> 502:      * @return {@code true} if the given permission  is implied by this

redundant space between `permission` and `is`?

src/java.base/share/classes/javax/crypto/CryptoPermissions.java line 47:

> 45: /**
> 46:  * This class contains {@code CryptoPermission} objects, organized into
> 47:  * PermissionCollections according to algorithm names.

There is no PermissionCollections class. So, this should probably be changed to "{@code PermissionCollection} objects.

src/java.base/share/classes/javax/crypto/CryptoPermissions.java line 94:

> 92:     /**
> 93:      * Populates the crypto policy from the specified
> 94:      * InputStream into this {@code CryptoPermissions} object.

add {@code } to InputStream?

src/java.base/share/classes/javax/crypto/CryptoPermissions.java line 164:

> 162:      * @param permission the {@code Permission} object to check.
> 163:      *
> 164:      * @return true if "permission" is implied by the permissions

should be {@code permission} instead of "permission". Also, add {@code } to true.

src/java.base/share/classes/javax/crypto/CryptoPermissions.java line 165:

> 163:      *
> 164:      * @return true if "permission" is implied by the permissions
> 165:      * in the {@code PermissionCollection} it belongs to, false if not.

add {@code } to false.

src/java.base/share/classes/javax/crypto/CryptoPermissions.java line 187:

> 185:     /**
> 186:      * Returns an enumeration of all the {@code Permission} objects
> 187:      * in all the PermissionCollections in this

There is no PermissionCollections class. So, this should probably be changed to {@code PermissionCollection} objects. However, the sentence seems long and a bit hard to parse. Do you think we really need the middle part, i.e. "in all the PermissionCollection objects"?

-------------

PR: https://git.openjdk.org/jdk/pull/9282



More information about the security-dev mailing list