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

Mark Powers duke at openjdk.org
Thu Jun 30 22:29:19 UTC 2022


On Tue, 28 Jun 2022 19:59:24 GMT, Weijun Wang <weijun 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/java/security/AccessController.java line 983:
> 
>> 981: 
>> 982:     /**
>> 983:      * Returns the "inherited" AccessControl context. This is the context
> 
> Not sure what "AccessControl context" is. Either "access control context" or "{@code AccessControlContext}".

using `{@code AccessControlContext}`

> src/java.base/share/classes/java/security/AccessController.java line 993:
> 
>> 991:     /**
>> 992:      * This method takes a "snapshot" of the current calling context, which
>> 993:      * includes the current Thread's inherited {@code AccessControlContext}
> 
> "Thread" to "thread".

Fixed in this file and a couple of others.

> src/java.base/share/classes/java/security/AccessController.java line 1021:
> 
>> 1019:      * the current {@code AccessControlContext} and security policy.
>> 1020:      * This method quietly returns if the access request
>> 1021:      * is permitted, or throws an AccessControlException otherwise. The
> 
> Want to code-ify "AccessControlException" as well?

Fixed.

> src/java.base/share/classes/java/security/AccessController.java line 1023:
> 
>> 1021:      * is permitted, or throws an AccessControlException otherwise. The
>> 1022:      * {@code getPermission} method of the AccessControlException returns the
>> 1023:      * {@code perm} {@code Permission} object instance.
> 
> Two "{@code" together. Maybe move "{@code perm}" to the end?

Moved to end.

> src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java line 144:
> 
>> 142:      * A new {@code AlgorithmParameterGenerator} object encapsulating the
>> 143:      * {@code AlgorithmParameterGeneratorSpi} implementation from the first
>> 144:      * Provider that supports the specified algorithm is returned.
> 
> "Provider" -> "provider".

Fixed.

> src/java.base/share/classes/java/security/Security.java line 1032:
> 
>> 1030:      * Returns a Set of Strings containing the names of all available
>> 1031:      * algorithms or types for the specified Java cryptographic service
>> 1032:      * (e.g., Signature, MessageDigest, Cipher, Mac, KeyStore). Returns
> 
> All these Java cryptographic service type names.

using `{@code }`

> src/java.base/share/classes/java/security/Security.java line 1033:
> 
>> 1031:      * algorithms or types for the specified Java cryptographic service
>> 1032:      * (e.g., Signature, MessageDigest, Cipher, Mac, KeyStore). Returns
>> 1033:      * an empty Set if there is no provider that supports the
> 
> "set" is OK.

Fixed.

> src/java.base/share/classes/java/security/Security.java line 1034:
> 
>> 1032:      * (e.g., Signature, MessageDigest, Cipher, Mac, KeyStore). Returns
>> 1033:      * an empty Set if there is no provider that supports the
>> 1034:      * specified service or if serviceName is {@code null}. For a complete list
> 
> `{@code serviceName}`.

Fixed.

> src/java.base/share/classes/java/security/UnresolvedPermission.java line 67:
> 
>> 65:  * containing information about the permission.
>> 66:  *
>> 67:  * <p>Later, when code calls AccessController.checkPermission
> 
> AccessController.checkPermission. Maybe make it a link.

made it a link

> src/java.base/share/classes/java/security/UnresolvedPermission.java line 329:
> 
>> 327:      * @param obj the object we are testing for equality with this object.
>> 328:      *
>> 329:      * @return true if obj is an {@code UnresolvedPermission}, and has the same
> 
> `{@code obj}`.

fixed

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

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



More information about the security-dev mailing list