On Thu, 21 Jul 2022 08:53:31 GMT, jquanC <d...@openjdk.org> wrote:

> There are some doc errors in sun.security.util.DerOutputStream, like the 
> followings,
> 
> 
> /**
>  * Private helper routine for writing DER encoded string values.
>  * @param s the string to write
>  * @param stringTag one of the DER string tags that indicate which
>  * encoding should be used to write the string out.
>  * @param enc the name of the encoder that should be used corresponding
>  * to the above tag.
>  */
> private void writeString(String s, byte stringTag, Charset charset) throws 
> IOException
> 
> The parameter is charset, but not enc.
> 
> 
> /**
>  * Marshals a DER integer on the output stream.
>  *
>  * @param i the integer in bytes, equivalent to BigInteger::toByteArray.
>  */
> public void putInteger(byte[] buf) throws IOException {
> 
> The parameter is buf, but not i.

Thanks for your careful check!


On the first point, I am not careful enough. As you said, there is no need to 
modify it cause it is quite clear at the end of the sentence.
On the second point, I have some doubts. 1) Here don't need to add ***@***.*** 
charset" because it's clear to everyone? ***@***.*** enc" does not seem to be 
used in the method. Shouldn't it be deleted?



Looking forward to your guidance.&nbsp;Thanks again!




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                            
                                            "openjdk/jdk"                       
                                                             ***@***.***&gt;;
发送时间:&nbsp;2022年7月22日(星期五) 凌晨5:53
***@***.***&gt;;
***@***.******@***.***&gt;;
主题:&nbsp;Re: [openjdk/jdk] 8290775: Some doc errors in DerOutputStream.java (PR 
#9585)





 
@XueleiFan requested changes on this pull request.
 
Thanks for the update.  However, I have concerns about the update os parameter 
descriptions.

 
In src/java.base/share/classes/sun/security/util/DerOutputStream.java:
 &gt; @@ -175,7 +175,7 @@ public void putInteger(BigInteger i) throws 
IOException {      /**       * Marshals a DER integer on the output stream.     
  * -     * @param i the integer in bytes, equivalent to 
BigInteger::toByteArray. +     * @param buf buffered data, which must be 
DER-encoded  
The information of the parameter, "the integer in bytes, equivalent to 
BigInteger::toByteArray", may be not necessary to be updated, which is right I 
think.
 
 
In src/java.base/share/classes/sun/security/util/DerOutputStream.java:
 &gt; @@ -461,8 +461,8 @@ public void putGeneralString(String s) throws 
IOException {       * @param s the string to write       * @param stringTag one 
of the DER string tags that indicate which       * encoding should be used to 
write the string out. -     * @param enc the name of the encoder that should be 
used corresponding -     * to the above tag. +     * @param charset the 
specified character set encodes a string into a  
I think it may be not necessary to update the parameter description.
 
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***&gt;

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

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

Reply via email to