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

Mark Powers duke at openjdk.org
Thu Jul 7 00:52:50 UTC 2022


On Wed, 6 Jul 2022 23:11:15 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

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

Fixed.

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

Fixed.

> src/java.base/share/classes/javax/crypto/CryptoPermission.java line 451:
> 
>> 449: 
>> 450: /**
>> 451:  * A {@code CryptoPermissionCollection} stores a set of
> 
> add object here.

Fixed.

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

Fixed.

> src/java.base/share/classes/javax/crypto/CryptoPermission.java line 477:
> 
>> 475: 
>> 476:     /**
>> 477:      * Adds a permission to the {@code CryptoPermissionCollection}.
> 
> add object here.

Fixed.

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

Fixed.

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

Fixed.

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

Fixed.

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

Fixed.

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

Fixed.

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

I don't think we need the middle part. Nothing is lost by removing it.

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

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



More information about the security-dev mailing list