Fix for Javadoc errors in java.base

Sean Mullan sean.mullan at oracle.com
Thu Aug 13 17:25:57 UTC 2020


On 8/13/20 1:21 PM, Jonathan Gibbons wrote:
>>>> --- 
>>>> old/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java 
>>>>
>>>> 2020-07-25 23:46:21.233726447 +0530
>>>> +++ 
>>>> new/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java 
>>>>
>>>> 2020-07-25 23:46:20.721720857 +0530
>>>> @@ -96,8 +96,6 @@
>>>>        * @param p the prime modulus
>>>>        * @param g the base generator
>>>>        * @param l the private-value length
>>>> -     *
>>>> -     * @exception InvalidKeyException if the key cannot be encoded
>>
>> This should actually remain, but it should be ProviderException which 
>> is a RuntimeException. See the other DHPrivateKey ctor as that 
>> specifies it correctly.
>>
>> --Sean
> 
> 
> I note the use of `@exception`, as compared to `@throws`, which is more 
> common.
> 
> Stats:
> `@exception` 7322 occurrences
> `@throws` 21173 occurrences
> 
> That's probably too many `@exception` to clean up. :-(

Right, that's probably a separate cleanup activity. However, if you want 
to change the 3 instances of @exception to @throws in DHPrivateKey, I'm 
fine with that.

--Sean


More information about the security-dev mailing list