Re: Fix for Javadoc errors in java.base

2020-08-19 Thread Roger Riggs

Looks fine Julia

On 8/18/20 1:02 PM, Julia Boes wrote:


Hi,

The two changes below still need to be reviewed. Any takers?

Cheers,

Julia

--- 
old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java2020-08-14 
23:55:41.953638446 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java2020-08-14 
23:55:41.445619497 +0530

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All 
rights reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All 
rights reserved.

  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@
      *
      * @return a CallSite, which, when invoked, will return an 
instance of the

      * functional interface
-     * @throws ReflectiveOperationException
+     * @throws LambdaConversionException
      */
     abstract CallSite buildCallSite()
             throws LambdaConversionException;
--- 
old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java2020-08-14 
23:55:42.977677096 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java2020-08-14 
23:55:42.473658062 +0530

@@ -200,7 +200,6 @@
      *
      * @return a CallSite, which, when invoked, will return an 
instance of the

      * functional interface
-     * @throws ReflectiveOperationException
      * @throws LambdaConversionException If properly formed 
functional interface

      * is not found
      */




Re: Fix for Javadoc errors in java.base

2020-08-18 Thread Mandy Chung

Looks fine.

Thanks
Mandy

On 8/18/20 10:02 AM, Julia Boes wrote:


Hi,

The two changes below still need to be reviewed. Any takers?

Cheers,

Julia

--- 
old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java2020-08-14 
23:55:41.953638446 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java2020-08-14 
23:55:41.445619497 +0530

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All 
rights reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All 
rights reserved.

  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@
      *
      * @return a CallSite, which, when invoked, will return an 
instance of the

      * functional interface
-     * @throws ReflectiveOperationException
+     * @throws LambdaConversionException
      */
     abstract CallSite buildCallSite()
             throws LambdaConversionException;
--- 
old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java2020-08-14 
23:55:42.977677096 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java2020-08-14 
23:55:42.473658062 +0530

@@ -200,7 +200,6 @@
      *
      * @return a CallSite, which, when invoked, will return an 
instance of the

      * functional interface
-     * @throws ReflectiveOperationException
      * @throws LambdaConversionException If properly formed 
functional interface

      * is not found
      */




Re: Fix for Javadoc errors in java.base

2020-08-18 Thread Julia Boes

Hi,

The two changes below still need to be reviewed. Any takers?

Cheers,

Julia

--- 
old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java2020-08-14 
23:55:41.953638446 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java2020-08-14 
23:55:41.445619497 +0530

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights 
reserved.

  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@
      *
      * @return a CallSite, which, when invoked, will return an 
instance of the

      * functional interface
-     * @throws ReflectiveOperationException
+     * @throws LambdaConversionException
      */
     abstract CallSite buildCallSite()
             throws LambdaConversionException;
--- 
old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java2020-08-14 
23:55:42.977677096 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java2020-08-14 
23:55:42.473658062 +0530

@@ -200,7 +200,6 @@
      *
      * @return a CallSite, which, when invoked, will return an 
instance of the

      * functional interface
-     * @throws ReflectiveOperationException
      * @throws LambdaConversionException If properly formed 
functional interface

      * is not found
      */


Re: Fix for Javadoc errors in java.base

2020-08-14 Thread Vipin Sharma
Hi Sean,

All 3 instances of @exception in DHPrivateKey are now replaced with @throws, 
added ProviderException similar to other constructor of DHPrivateKey.

Updated patch:

--- old/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java   
2020-08-14 23:55:40.921599987 +0530
+++ new/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java   
2020-08-14 23:55:40.417581423 +0530
@@ -80,7 +80,7 @@
  * @param p the prime modulus
  * @param g the base generator
  *
- * @exception ProviderException if the key cannot be encoded
+ * @throws ProviderException if the key cannot be encoded
  */
 DHPrivateKey(BigInteger x, BigInteger p, BigInteger g)
 throws InvalidKeyException {
@@ -97,7 +97,7 @@
  * @param g the base generator
  * @param l the private-value length
  *
- * @exception InvalidKeyException if the key cannot be encoded
+ * @throws ProviderException if the key cannot be encoded
  */
 DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) {
 this.x = x;
@@ -118,7 +118,7 @@
  *
  * @param encodedKey the encoded key
  *
- * @exception InvalidKeyException if the encoded key does not represent
+ * @throws InvalidKeyException if the encoded key does not represent
  * a Diffie-Hellman private key
  */
 DHPrivateKey(byte[] encodedKey) throws InvalidKeyException {
--- 
old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
   2020-08-14 23:55:41.953638446 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
   2020-08-14 23:55:41.445619497 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@
  *
  * @return a CallSite, which, when invoked, will return an instance of the
  * functional interface
- * @throws ReflectiveOperationException
+ * @throws LambdaConversionException
  */
 abstract CallSite buildCallSite()
 throws LambdaConversionException;
--- 
old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
   2020-08-14 23:55:42.977677096 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
   2020-08-14 23:55:42.473658062 +0530
@@ -200,7 +200,6 @@
  *
  * @return a CallSite, which, when invoked, will return an instance of the
  * functional interface
- * @throws ReflectiveOperationException
  * @throws LambdaConversionException If properly formed functional 
interface
  * is not found
  */
--- old/src/java.base/share/classes/java/math/BigDecimal.java   2020-08-14 
23:55:44.409731999 +0530
+++ new/src/java.base/share/classes/java/math/BigDecimal.java   2020-08-14 
23:55:43.889711942 +0530
@@ -5403,7 +5403,7 @@
  *
  * @param n the numerator; must be negative
  * @param d the denominator; must not be unity
- * @return a two-element {@long} array with the remainder and quotient in
+ * @return a two-element {@code long} array with the remainder and 
quotient in
  * the initial and final elements, respectively
  */
 private static long[] divRemNegativeLong(long n, long d) {
--- old/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-08-14 23:55:45.905790246 +0530
+++ new/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-08-14 23:55:45.397770378 +0530
@@ -145,7 +145,6 @@
  * Makes this number an {@code n}-int number all of whose bits are ones.
  * Used by Burnikel-Ziegler division.
  * @param n number of ints in the {@code value} array
- * @return a number equal to {@code ((1<<(32*n)))-1}
  */
 private void ones(int n) {
 if (n > value.length)
--- old/src/java.base/share/classes/java/net/ServerSocket.java  2020-08-14 
23:55:46.961831962 +0530
+++ new/src/java.base/share/classes/java/net/ServerSocket.java  2020-08-14 
23:55:46.449811716 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
 /**
  * Creates the socket implementation.
  *
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
  * @since 1.4
  */
 void createImpl() throws SocketException {
--- old/src/java.base/share/classes/java/net/Socket.java2020-08-14 
23:55:48.001873514 +0530
+++ new/src/java.base/share/classes/java/net/Socket.java

Re: Fix for Javadoc errors in java.base

2020-08-13 Thread Sean Mullan

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


Re: Fix for Javadoc errors in java.base

2020-08-13 Thread Jonathan Gibbons



On 8/13/20 10:13 AM, Sean Mullan wrote:

On 8/13/20 11:05 AM, Julia Boes wrote:

Hi Vipin,

Thanks for providing this fix, I'm happy to sponsor your change. To 
complete the review, we still need someone to green light the 
remaining changes below. I'm looping in net-dev and security-dev to 
have a look.


Bug: https://bugs.openjdk.java.net/browse/JDK-8251542

Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8251542/webrev/

Once the review is completed, please provide me with a patch that 
includes a changeset comment as described here: 
https://openjdk.java.net/guide/producingChangeset.html


If you have any questions, let me know.

Cheers,

Julia

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

-- Jon



Re: Fix for Javadoc errors in java.base

2020-08-13 Thread Sean Mullan

On 8/13/20 11:05 AM, Julia Boes wrote:

Hi Vipin,

Thanks for providing this fix, I'm happy to sponsor your change. To 
complete the review, we still need someone to green light the remaining 
changes below. I'm looping in net-dev and security-dev to have a look.


Bug: https://bugs.openjdk.java.net/browse/JDK-8251542

Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8251542/webrev/

Once the review is completed, please provide me with a patch that 
includes a changeset comment as described here: 
https://openjdk.java.net/guide/producingChangeset.html


If you have any questions, let me know.

Cheers,

Julia

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


Re: Fix for Javadoc errors in java.base

2020-08-13 Thread Daniel Fuchs

Hi Vipin, Julia,

On 13/08/2020 16:05, Julia Boes wrote:

Hi Vipin,

Thanks for providing this fix, I'm happy to sponsor your change. To 
complete the review, we still need someone to green light the remaining 
changes below. I'm looping in net-dev and security-dev to have a look.


Changes to Socket and ServerSocket look fine.
No CSR needed since this is a package private API.




Bug: https://bugs.openjdk.java.net/browse/JDK-8251542

Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8251542/webrev/


best regards,

-- daniel


Re: Fix for Javadoc errors in java.base

2020-08-13 Thread Julia Boes

Hi Vipin,

Thanks for providing this fix, I'm happy to sponsor your change. To 
complete the review, we still need someone to green light the remaining 
changes below. I'm looping in net-dev and security-dev to have a look.


Bug: https://bugs.openjdk.java.net/browse/JDK-8251542

Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8251542/webrev/

Once the review is completed, please provide me with a patch that 
includes a changeset comment as described here: 
https://openjdk.java.net/guide/producingChangeset.html


If you have any questions, let me know.

Cheers,

Julia


--- 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
   */
  DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) {
  this.x = x;
--- 
old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
2020-07-25 23:46:22.241737383 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
2020-07-25 23:46:21.745732013 +0530
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@
   *
   * @return a CallSite, which, when invoked, will return an instance of the
   * functional interface
- * @throws ReflectiveOperationException
+ * @throws LambdaConversionException
   */
  abstract CallSite buildCallSite()
  throws LambdaConversionException;
--- 
old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
2020-07-25 23:46:23.261748361 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
2020-07-25 23:46:22.761742991 +0530
@@ -200,7 +200,6 @@
   *
   * @return a CallSite, which, when invoked, will return an instance of the
   * functional interface
- * @throws ReflectiveOperationException
   * @throws LambdaConversionException If properly formed functional 
interface
   * is not found
   */
--- old/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
23:46:26.449782093 +0530
+++ new/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
23:46:25.937776742 +0530
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
  /**
   * Creates the socket implementation.
   *
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
   * @since 1.4
   */
  void createImpl() throws SocketException {
--- old/src/java.base/share/classes/java/net/Socket.java 2020-07-25
23:46:27.485792869 +0530
+++ new/src/java.base/share/classes/java/net/Socket.java 2020-07-25
23:46:26.973787565 +0530
@@ -533,7 +533,7 @@
   *
   * @param stream a {@code boolean} value : {@code true} for a TCP socket,
   *   {@code false} for UDP.
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
   * @since 1.4
   */
   void createImpl(boolean stream) throws SocketException {


Re: Fix for Javadoc errors in java.base

2020-08-10 Thread Joe Darcy

Hi Vipin,

My review comments on the files I look after is interspersed below.

On 7/27/2020 10:28 PM, Vipin Sharma wrote:

Hi Joe,

I ran an IntelliJ inspection to find these errors.

Regards,
Vipin

 
	Virus-free. www.avast.com 
 




On Tue, Jul 28, 2020 at 5:53 AM Joe Darcy > wrote:


Hello Vipin,

What tooling was used to find these errors? Running doclint against
private methods too?

Thanks,

-Joe

On 7/27/2020 12:37 PM, Vipin Sharma wrote:
> Hi,
>
> This patch fixes Javadoc errors in java.base, please sponsor
this patch and
> help to create a bug id for this.
> I have signed OCA, this is my third patch.
>




> --- old/src/java.base/share/classes/java/math/BigDecimal.java
2020-07-25
> 23:46:24.285759291 +0530
> +++ new/src/java.base/share/classes/java/math/BigDecimal.java
2020-07-25
> 23:46:23.785753966 +0530
> @@ -5413,7 +5413,7 @@
>        *
>        * @param n the numerator; must be negative
>        * @param d the denominator; must not be unity
> -     * @return a two-element {@long} array with the remainder
and quotient
> in
> +     * @return a two-element {@code long} array with the
remainder and
> quotient in
>        *         the initial and final elements, respectively
>        */
>       private static long[] divRemNegativeLong(long n, long d) {



Looks fine.



> --- old/src/java.base/share/classes/java/math/MutableBigInteger.java
> 2020-07-25 23:46:25.381770889 +0530
> +++ new/src/java.base/share/classes/java/math/MutableBigInteger.java
> 2020-07-25 23:46:24.877765572 +0530
> @@ -145,7 +145,6 @@
>        * Makes this number an {@code n}-int number all of whose
bits are
> ones.
>        * Used by Burnikel-Ziegler division.
>        * @param n number of ints in the {@code value} array
> -     * @return a number equal to {@code ((1<<(32*n)))-1}
>        */
>       private void ones(int n) {
>           if (n > value.length)


Looks fine.



>
old/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java
> 2020-07-25 23:46:28.545803801 +0530
> +++
>
new/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java
> 2020-07-25 23:46:28.029798501 +0530
> @@ -1,5 +1,5 @@
>   /*
> - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All
rights
> reserved.
> + * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All
rights
> reserved.
>    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>    *
>    * This code is free software; you can redistribute it and/or
modify it
> @@ -773,7 +773,7 @@
>        * an "annotation structure" OR two bytes into an annotation
>        * structure (i.e., after the type index).
>        *
> -     * @parameter complete true if the byte buffer points to
the beginning
> +     * @param complete true if the byte buffer points to the
beginning
>        *     of an annotation structure (rather than two bytes in).
>        */
>       private static void skipAnnotation(ByteBuffer buf, boolean
complete) {


Also looks fine.

Cheers,

-Joe









Re: Fix for Javadoc errors in java.base

2020-07-27 Thread Vipin Sharma
Hi Joe,

I ran an IntelliJ inspection to find these errors.

Regards,
Vipin


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Jul 28, 2020 at 5:53 AM Joe Darcy  wrote:

> Hello Vipin,
>
> What tooling was used to find these errors? Running doclint against
> private methods too?
>
> Thanks,
>
> -Joe
>
> On 7/27/2020 12:37 PM, Vipin Sharma wrote:
> > Hi,
> >
> > This patch fixes Javadoc errors in java.base, please sponsor this patch
> and
> > help to create a bug id for this.
> > I have signed OCA, this is my third patch.
> >
> > ---
> > 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
> >*/
> >   DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) {
> >   this.x = x;
> > ---
> >
> old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
> > 2020-07-25 23:46:22.241737383 +0530
> > +++
> >
> new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
> > 2020-07-25 23:46:21.745732013 +0530
> > @@ -1,5 +1,5 @@
> >   /*
> > - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights
> > reserved.
> > + * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights
> > reserved.
> >* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> >*
> >* This code is free software; you can redistribute it and/or modify it
> > @@ -208,7 +208,7 @@
> >*
> >* @return a CallSite, which, when invoked, will return an
> instance of
> > the
> >* functional interface
> > - * @throws ReflectiveOperationException
> > + * @throws LambdaConversionException
> >*/
> >   abstract CallSite buildCallSite()
> >   throws LambdaConversionException;
> > ---
> >
> old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
> > 2020-07-25 23:46:23.261748361 +0530
> > +++
> >
> new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
> > 2020-07-25 23:46:22.761742991 +0530
> > @@ -200,7 +200,6 @@
> >*
> >* @return a CallSite, which, when invoked, will return an
> instance of
> > the
> >* functional interface
> > - * @throws ReflectiveOperationException
> >* @throws LambdaConversionException If properly formed functional
> > interface
> >* is not found
> >*/
> > --- old/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
> > 23:46:24.285759291 +0530
> > +++ new/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
> > 23:46:23.785753966 +0530
> > @@ -5413,7 +5413,7 @@
> >*
> >* @param n the numerator; must be negative
> >* @param d the denominator; must not be unity
> > - * @return a two-element {@long} array with the remainder and
> quotient
> > in
> > + * @return a two-element {@code long} array with the remainder and
> > quotient in
> >* the initial and final elements, respectively
> >*/
> >   private static long[] divRemNegativeLong(long n, long d) {
> > --- old/src/java.base/share/classes/java/math/MutableBigInteger.java
> > 2020-07-25 23:46:25.381770889 +0530
> > +++ new/src/java.base/share/classes/java/math/MutableBigInteger.java
> > 2020-07-25 23:46:24.877765572 +0530
> > @@ -145,7 +145,6 @@
> >* Makes this number an {@code n}-int number all of whose bits are
> > ones.
> >* Used by Burnikel-Ziegler division.
> >* @param n number of ints in the {@code value} array
> > - * @return a number equal to {@code ((1<<(32*n)))-1}
> >*/
> >   private void ones(int n) {
> >   if (n > value.length)
> > --- old/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
> > 23:46:26.449782093 +0530
> > +++ new/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
> > 23:46:25.937776742 +0530
> > @@ -1,5 +1,5 @@
> >   /*
> > - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights
> > reserved.
> > + * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights
> > reserved.
> >* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> >*
> >* This code is free software; you can redistribute it and/or modify it
> > @@ -315,7 +315,7 @@
> >   /**
> >* Creates the socket implementation.
> >*
> > - * @throws IOException if creation 

Re: Fix for Javadoc errors in java.base

2020-07-27 Thread Joe Darcy

Hello Vipin,

What tooling was used to find these errors? Running doclint against 
private methods too?


Thanks,

-Joe

On 7/27/2020 12:37 PM, Vipin Sharma wrote:

Hi,

This patch fixes Javadoc errors in java.base, please sponsor this patch and
help to create a bug id for this.
I have signed OCA, this is my third patch.

---
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
   */
  DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) {
  this.x = x;
---
old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
2020-07-25 23:46:22.241737383 +0530
+++
new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
2020-07-25 23:46:21.745732013 +0530
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights
reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@
   *
   * @return a CallSite, which, when invoked, will return an instance of
the
   * functional interface
- * @throws ReflectiveOperationException
+ * @throws LambdaConversionException
   */
  abstract CallSite buildCallSite()
  throws LambdaConversionException;
---
old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
2020-07-25 23:46:23.261748361 +0530
+++
new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
2020-07-25 23:46:22.761742991 +0530
@@ -200,7 +200,6 @@
   *
   * @return a CallSite, which, when invoked, will return an instance of
the
   * functional interface
- * @throws ReflectiveOperationException
   * @throws LambdaConversionException If properly formed functional
interface
   * is not found
   */
--- old/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
23:46:24.285759291 +0530
+++ new/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
23:46:23.785753966 +0530
@@ -5413,7 +5413,7 @@
   *
   * @param n the numerator; must be negative
   * @param d the denominator; must not be unity
- * @return a two-element {@long} array with the remainder and quotient
in
+ * @return a two-element {@code long} array with the remainder and
quotient in
   * the initial and final elements, respectively
   */
  private static long[] divRemNegativeLong(long n, long d) {
--- old/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-07-25 23:46:25.381770889 +0530
+++ new/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-07-25 23:46:24.877765572 +0530
@@ -145,7 +145,6 @@
   * Makes this number an {@code n}-int number all of whose bits are
ones.
   * Used by Burnikel-Ziegler division.
   * @param n number of ints in the {@code value} array
- * @return a number equal to {@code ((1<<(32*n)))-1}
   */
  private void ones(int n) {
  if (n > value.length)
--- old/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
23:46:26.449782093 +0530
+++ new/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
23:46:25.937776742 +0530
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights
reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
  /**
   * Creates the socket implementation.
   *
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
   * @since 1.4
   */
  void createImpl() throws SocketException {
--- old/src/java.base/share/classes/java/net/Socket.java 2020-07-25
23:46:27.485792869 +0530
+++ new/src/java.base/share/classes/java/net/Socket.java 2020-07-25
23:46:26.973787565 +0530
@@ -533,7 +533,7 @@
   *
   * @param stream a {@code boolean} value : {@code true} for a TCP
socket,
   *   {@code false} for UDP.
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
   * @since 1.4
   */
   void createImpl(boolean stream) throws SocketException {
---
old/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java
2020-07-25 23:46:28.545803801 +0530
+++

Fix for Javadoc errors in java.base

2020-07-27 Thread Vipin Sharma
Hi,

This patch fixes Javadoc errors in java.base, please sponsor this patch and
help to create a bug id for this.
I have signed OCA, this is my third patch.

---
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
  */
 DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) {
 this.x = x;
---
old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
2020-07-25 23:46:22.241737383 +0530
+++
new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
2020-07-25 23:46:21.745732013 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights
reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@
  *
  * @return a CallSite, which, when invoked, will return an instance of
the
  * functional interface
- * @throws ReflectiveOperationException
+ * @throws LambdaConversionException
  */
 abstract CallSite buildCallSite()
 throws LambdaConversionException;
---
old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
2020-07-25 23:46:23.261748361 +0530
+++
new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
2020-07-25 23:46:22.761742991 +0530
@@ -200,7 +200,6 @@
  *
  * @return a CallSite, which, when invoked, will return an instance of
the
  * functional interface
- * @throws ReflectiveOperationException
  * @throws LambdaConversionException If properly formed functional
interface
  * is not found
  */
--- old/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
23:46:24.285759291 +0530
+++ new/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
23:46:23.785753966 +0530
@@ -5413,7 +5413,7 @@
  *
  * @param n the numerator; must be negative
  * @param d the denominator; must not be unity
- * @return a two-element {@long} array with the remainder and quotient
in
+ * @return a two-element {@code long} array with the remainder and
quotient in
  * the initial and final elements, respectively
  */
 private static long[] divRemNegativeLong(long n, long d) {
--- old/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-07-25 23:46:25.381770889 +0530
+++ new/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-07-25 23:46:24.877765572 +0530
@@ -145,7 +145,6 @@
  * Makes this number an {@code n}-int number all of whose bits are
ones.
  * Used by Burnikel-Ziegler division.
  * @param n number of ints in the {@code value} array
- * @return a number equal to {@code ((1<<(32*n)))-1}
  */
 private void ones(int n) {
 if (n > value.length)
--- old/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
23:46:26.449782093 +0530
+++ new/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
23:46:25.937776742 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights
reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
 /**
  * Creates the socket implementation.
  *
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
  * @since 1.4
  */
 void createImpl() throws SocketException {
--- old/src/java.base/share/classes/java/net/Socket.java 2020-07-25
23:46:27.485792869 +0530
+++ new/src/java.base/share/classes/java/net/Socket.java 2020-07-25
23:46:26.973787565 +0530
@@ -533,7 +533,7 @@
  *
  * @param stream a {@code boolean} value : {@code true} for a TCP
socket,
  *   {@code false} for UDP.
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
  * @since 1.4
  */
  void createImpl(boolean stream) throws SocketException {
---
old/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java
2020-07-25 23:46:28.545803801 +0530
+++
new/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java
2020-07-25 23:46:28.029798501 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All